From 632ada5405f857373662a1087bf45e30fc15e0cb Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Sat, 16 Jan 2016 14:54:42 +0100 Subject: [PATCH] Fix uncaught exception when opening the devtools --- extension/lib/utils.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extension/lib/utils.coffee b/extension/lib/utils.coffee index 10d939b..b9b49f9 100644 --- a/extension/lib/utils.coffee +++ b/extension/lib/utils.coffee @@ -249,7 +249,9 @@ containsDeep = (parent, element) -> parentWindow = parent.ownerGlobal elementWindow = element.ownerGlobal - while elementWindow != parentWindow and elementWindow.top != elementWindow + # Owner windows might be missing when opening the devtools. + while elementWindow and parentWindow and + elementWindow != parentWindow and elementWindow.top != elementWindow element = elementWindow.frameElement elementWindow = element.ownerGlobal -- 2.39.3