From 63f3970ac6424c8627c2d055609f60024e93082c Mon Sep 17 00:00:00 2001 From: hackademix Date: Tue, 14 Aug 2018 01:08:00 +0200 Subject: Cope with tabId changes on session restore. --- main_background.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main_background.js b/main_background.js index 35081ea..799c69f 100644 --- a/main_background.js +++ b/main_background.js @@ -435,6 +435,8 @@ async function onTabUpdated(tabId, changedInfo, tab) { let report = activityReports[tabId]; if (!(report && report.url === url)) { let cache = await browser.sessions.getTabValue(tabId, url); + // on session restore tabIds may change + if (cache && cache.tabId !== tabId) cache.tabId = tabId; updateBadge(tabId, activityReports[tabId] = cache); } } -- cgit v1.2.3