aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Campoverde <alx@sillybytes.net>2017-11-26 14:40:26 -0500
committerDaniel Campoverde <alx@sillybytes.net>2017-11-26 14:40:26 -0500
commit0056c5fec4cf44ced8d2fc0880f7cc462971c0ec (patch)
tree63912ed86feff5928dc6a7518e6e3530e1dfce05
parent70a47fdaeee9da195369a625a5f820731eaeaf3f (diff)
Fix visible links test
-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 d4b033a..f44f173 100644
--- a/src/background/tabs.js
+++ b/src/background/tabs.js
@@ -2,8 +2,10 @@ let prevSelTab = 1;
let currSelTab = 1;
browser.tabs.onActivated.addListener((activeInfo) => {
- prevSelTab = currSelTab;
- currSelTab = activeInfo.tabId;
+ return browser.tabs.query({ currentWindow: true }).then((tabs) => {
+ prevSelTab = currSelTab;
+ currSelTab = activeInfo.tabId;
+ });
});
const closeTab = (id) => {