aboutsummaryrefslogtreecommitdiff
path: root/main_background.js
diff options
context:
space:
mode:
authorhackademix <giorgio@maone.net>2018-08-14 01:08:00 +0200
committerhackademix <giorgio@maone.net>2018-08-14 01:08:00 +0200
commit63f3970ac6424c8627c2d055609f60024e93082c (patch)
tree8999739aa101743e66f7f5812dd0f10c846d9fa7 /main_background.js
parentd6902eea60acea9f1ea3828e1cdb0bf6288e7b06 (diff)
Cope with tabId changes on session restore.
Diffstat (limited to 'main_background.js')
-rw-r--r--main_background.js2
1 files changed, 2 insertions, 0 deletions
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);
}
}