From 5e1b4164834a6008bbf6cb928b7f95d62d5fdc4c Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Sat, 17 Oct 2015 13:51:22 +0200 Subject: [PATCH] Fix uncaught exception on focus/blur `window` does not have `.ownerDocument` --- extension/lib/utils.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/lib/utils.coffee b/extension/lib/utils.coffee index 8b0561f..f84913a 100644 --- a/extension/lib/utils.coffee +++ b/extension/lib/utils.coffee @@ -62,7 +62,7 @@ isContentEditable = (element) -> return element.isContentEditable or # `g_editable` is a non-standard attribute commonly used by Google. element.getAttribute?('g_editable') == 'true' or - element.ownerDocument.body?.getAttribute('g_editable') == 'true' + element.ownerDocument?.body?.getAttribute('g_editable') == 'true' isProperLink = (element) -> # `.getAttribute` is used below instead of `.hasAttribute` to exclude `