aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index c3c7f3f0985..2b2b472f7c5 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -781,8 +781,8 @@ impl ScriptTask {
// case, which is wrong. We should be returning an object that
// denies access to most properties (per
// https://github.com/servo/servo/issues/3939#issuecomment-62287025).
- borrowed_page.find(pid).and_then(|page| {
- Some(page.frame.borrow().as_ref().unwrap().window.root())
+ borrowed_page.find(pid).map(|page| {
+ page.frame.borrow().as_ref().unwrap().window.root()
})
});