diff options
author | Marius David Wieschollek <passwords.public@mdns.eu> | 2021-01-15 00:51:23 +0300 |
---|---|---|
committer | Marius David Wieschollek <passwords.public@mdns.eu> | 2021-01-15 00:51:23 +0300 |
commit | 2e8fd3af07b6e6349fa530602e881b6e320c8264 (patch) | |
tree | fc98c8e6ad1ef3e5d9b74ef90b759fdc02ae5f1d | |
parent | 830ca68a4858a40c845c99f4fcbe2d7914b9f970 (diff) |
Fix tabs error
Signed-off-by: Marius David Wieschollek <passwords.public@mdns.eu>
-rw-r--r-- | src/js/Manager/TabManager.js | 8 |
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()); } |