aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmllinkelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/htmllinkelement.rs')
-rw-r--r--components/script/dom/htmllinkelement.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs
index 963f570700a..f1a8242b345 100644
--- a/components/script/dom/htmllinkelement.rs
+++ b/components/script/dom/htmllinkelement.rs
@@ -242,8 +242,8 @@ impl VirtualMethods for HTMLLinkElement {
s.unbind_from_tree(context);
}
- if let Some(ref s) = *self.stylesheet.borrow() {
- document_from_node(self).remove_stylesheet(self.upcast(), s);
+ if let Some(s) = self.stylesheet.borrow_mut().take() {
+ document_from_node(self).remove_stylesheet(self.upcast(), &s);
}
}
}