script: Fix stylesheet adoption.

This commit is contained in:
Emilio Cobos Álvarez 2017-09-13 17:11:24 +02:00
parent 02d1264047
commit 82c58d0a05
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 6 additions and 7 deletions

View file

@ -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);
}
}
}