Skip to content

Commit 2b332a5

Browse files
committed
Call the method of our custom tab correctly
1 parent 764f221 commit 2b332a5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

webextensions/background/background-cache.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,8 +515,9 @@ Tab.onWindowRestoring.addListener(async ({ windowId, restoredCount }) => {
515515
// See https://github.com/piroor/treestyletab/issues/3794
516516
log('Tabs.onWindowRestoring: failsafe: setting discarded tabs as pending...');
517517
for (const tab of tabs) {
518-
if (tab.discarded) {
519-
tab.$TST.addState(Constants.kTAB_STATE_PENDING);
518+
const trackedTab = Tab.get(tab.id);
519+
if (trackedTab?.discarded) {
520+
trackedTab.$TST.addState(Constants.kTAB_STATE_PENDING);
520521
}
521522
}
522523
}

0 commit comments

Comments
 (0)