From 0056c5fec4cf44ced8d2fc0880f7cc462971c0ec Mon Sep 17 00:00:00 2001 From: Daniel Campoverde Date: Sun, 26 Nov 2017 14:40:26 -0500 Subject: Fix visible links test --- src/background/tabs.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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) => { -- cgit v1.2.3