make sure BG.API_METHODS is defined

This commit is contained in:
tophf 2018-05-05 20:17:33 +03:00
parent f214e6a31b
commit 10a0fedd05

View File

@ -93,6 +93,8 @@ if (!BG || BG !== window) {
getActiveTab().then(tab => getActiveTab().then(tab =>
window.API.updateIcon({tab})); window.API.updateIcon({tab}));
} }
} else if (!BG.API_METHODS) {
BG.API_METHODS = {};
} }
const FIREFOX_NO_DOM_STORAGE = FIREFOX && !tryCatch(() => localStorage); const FIREFOX_NO_DOM_STORAGE = FIREFOX && !tryCatch(() => localStorage);