diff options
author | Daniel Campoverde <alx@sillybytes.net> | 2017-10-29 22:01:12 -0500 |
---|---|---|
committer | Daniel Campoverde <alx@sillybytes.net> | 2017-10-29 22:01:12 -0500 |
commit | 2c97f8a4f3b31d38922783b8f5e6237da33ce86b (patch) | |
tree | 0faddc243cec1382ac7628b3ec53713bc9828168 | |
parent | 026fee32d6e8d28c3abddfd7edd245c2d6b1c3ea (diff) |
Fix selectFirstTab
-rw-r--r-- | src/background/tabs.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/background/tabs.js b/src/background/tabs.js index 423e84a..2028503 100644 --- a/src/background/tabs.js +++ b/src/background/tabs.js @@ -80,8 +80,10 @@ const selectNextTab = (current, count) => { }; const selectFirstTab = (current, count) => { - let id = tabs[0].id; - return browser.tabs.update(id, { active: true }); + return browser.tabs.query({ currentWindow: true }).then((tabs) => { + let id = tabs[0].id; + return browser.tabs.update(id, { active: true }); + }); }; // const selectFirstTab = (current, count) => { |