aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-02-09 21:11:35 +0200
committersiikamiika <siikamiika@users.noreply.github.com>2020-02-09 21:51:33 +0200
commit1797edc7d88f63872c3a593179d9dd5c7b3c0b47 (patch)
tree52b337261ee5d2307b152c800cd33b17f392ee66 /ext/bg/js
parent9fbd47e4eaeee2f1121cdeae08dbc5439b247498 (diff)
check chrome.windows support before using
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/backend.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index f94463aa..6d23b695 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -629,6 +629,10 @@ class Backend {
chrome.tabs.create({url});
return;
case 'popup':
+ if (!isObject(chrome.windows)) {
+ // chrome.windows not supported (e.g. on Firefox mobile)
+ return;
+ }
if (this.popupWindow !== null) {
const callback = () => this.checkLastError(chrome.runtime.lastError);
chrome.windows.remove(this.popupWindow.id, callback);