aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/servoparser/async_html.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/servoparser/async_html.rs')
-rw-r--r--components/script/dom/servoparser/async_html.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/servoparser/async_html.rs b/components/script/dom/servoparser/async_html.rs
index 5beffe225f3..a0c1584eba3 100644
--- a/components/script/dom/servoparser/async_html.rs
+++ b/components/script/dom/servoparser/async_html.rs
@@ -485,7 +485,9 @@ impl Tokenizer {
},
ParseOperation::MarkScriptAlreadyStarted { node } => {
let script = self.get_node(&node).downcast::<HTMLScriptElement>();
- script.map(|script| script.set_already_started(true));
+ if let Some(script) = script {
+ script.set_already_started(true)
+ }
},
ParseOperation::ReparentChildren { parent, new_parent } => {
let parent = self.get_node(&parent);