aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_module.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/script_module.rs')
-rw-r--r--components/script/script_module.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/script_module.rs b/components/script/script_module.rs
index 4bb60f5a233..6eb89dd1ba0 100644
--- a/components/script/script_module.rs
+++ b/components/script/script_module.rs
@@ -633,6 +633,7 @@ impl ModuleTree {
}
// 5-6.
+ let mut errors: Vec<ModuleError> = Vec::new();
let descendant_urls = module_tree.get_descendant_urls().borrow();
for descendant_module in descendant_urls
@@ -650,13 +651,13 @@ impl ModuleTree {
ModuleTree::find_first_parse_error(&global, &descendant_module, discovered_urls);
// 8-4.
- if child_parse_error.is_some() {
- return child_parse_error;
+ if let Some(child_error) = child_parse_error {
+ errors.push(child_error);
}
}
// Step 9.
- return None;
+ return errors.into_iter().max();
}
}