diff options
author | hackademix <giorgio@maone.net> | 2018-08-14 01:08:00 +0200 |
---|---|---|
committer | hackademix <giorgio@maone.net> | 2018-08-14 01:08:00 +0200 |
commit | 63f3970ac6424c8627c2d055609f60024e93082c (patch) | |
tree | 8999739aa101743e66f7f5812dd0f10c846d9fa7 /main_background.js | |
parent | d6902eea60acea9f1ea3828e1cdb0bf6288e7b06 (diff) |
Cope with tabId changes on session restore.
Diffstat (limited to 'main_background.js')
-rw-r--r-- | main_background.js | 2 |
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); } } |