From 30c19cf64e6a288497866e28199481ba89ed7f8c Mon Sep 17 00:00:00 2001 From: tophf Date: Fri, 4 Aug 2017 12:42:34 +0300 Subject: [PATCH] fixup 860443b9: BG can point to itself --- js/messaging.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/messaging.js b/js/messaging.js index 05ba5c73..ffc594bf 100644 --- a/js/messaging.js +++ b/js/messaging.js @@ -46,7 +46,7 @@ URLS.supported = new RegExp( ); let BG = chrome.extension.getBackgroundPage(); -if (BG && !BG.getStyles) { +if (BG && !BG.getStyles && BG !== window) { // own page like editor/manage is being loaded on browser startup // before the background page has been fully initialized; // it'll be resolved in onBackgroundReady() instead