From 10a0fedd054e61a95c6aba71074b9025238badd4 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 5 May 2018 20:17:33 +0300 Subject: [PATCH] make sure BG.API_METHODS is defined --- js/messaging.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/messaging.js b/js/messaging.js index d7c35c45..1bc6ba9f 100644 --- a/js/messaging.js +++ b/js/messaging.js @@ -93,6 +93,8 @@ if (!BG || BG !== window) { getActiveTab().then(tab => window.API.updateIcon({tab})); } +} else if (!BG.API_METHODS) { + BG.API_METHODS = {}; } const FIREFOX_NO_DOM_STORAGE = FIREFOX && !tryCatch(() => localStorage);