From 1797edc7d88f63872c3a593179d9dd5c7b3c0b47 Mon Sep 17 00:00:00 2001 From: siikamiika Date: Sun, 9 Feb 2020 21:11:35 +0200 Subject: [PATCH] check chrome.windows support before using --- ext/bg/js/backend.js | 4 ++++ 1 file changed, 4 insertions(+) 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);