aboutsummaryrefslogtreecommitdiff
path: root/src/background
diff options
context:
space:
mode:
Diffstat (limited to 'src/background')
-rw-r--r--src/background/tabs.js6
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) => {