Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marius-wieschollek/passwords-webextension.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorMarius David Wieschollek <passwords.public@mdns.eu>2021-01-15 00:24:19 +0300
committerMarius David Wieschollek <passwords.public@mdns.eu>2021-01-15 00:24:19 +0300
commit719ba07d06d278c66a79c3051d0abdfb7ca80adf (patch)
tree73a0e6483889b72266293b4d9523bb59b7a04752 /src/js
parent712c2e1b4232f98a3cb8e70d35684bcb57df7711 (diff)
Fix issue with missing windows api
Signed-off-by: Marius David Wieschollek <passwords.public@mdns.eu>
Diffstat (limited to 'src/js')
-rw-r--r--src/js/Manager/TabManager.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/js/Manager/TabManager.js b/src/js/Manager/TabManager.js
index ebe6e5a..692b6d8 100644
--- a/src/js/Manager/TabManager.js
+++ b/src/js/Manager/TabManager.js
@@ -54,9 +54,11 @@ class TabManager {
this._api.tabs.onUpdated.addListener(this._updatedEvent);
this._api.tabs.onReplaced.addListener(this._refreshEvent);
this._api.tabs.onHighlighted.addListener(this._refreshEvent);
- this._api.windows.onCreated.addListener(this._refreshEvent);
- this._api.windows.onRemoved.addListener(this._refreshEvent);
- this._api.windows.onFocusChanged.addListener(this._refreshEvent);
+ if(this._api.windows) {
+ this._api.windows.onCreated.addListener(this._refreshEvent);
+ this._api.windows.onRemoved.addListener(this._refreshEvent);
+ this._api.windows.onFocusChanged.addListener(this._refreshEvent);
+ }
this._updateTabInfo().catch(ErrorManager.catch());
}