Skip to content

Commit

Permalink
Ignore already handled change of openerTabId
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Aug 7, 2024
1 parent c958ec1 commit 5961a8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webextensions/background/api-tabs-listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,11 @@ async function onUpdated(tabId, changeInfo, tab) {
continue;
if ('key' in updatedTab)
oldState[key] = updatedTab[key];
if (key == 'openerTabId')
if (key == 'openerTabId') {
if (changeInfo.openerTabId == updatedTab.openerTabId) // already processed
continue;
log(`openerTabId of ${tabId} is changed by someone (notified via changeInfo)!: ${updatedTab.openerTabId} (original) => ${changeInfo[key]} (changed by someone)`, configs.debug && new Error().stack);
}
updatedTab[key] = changeInfo[key];
}
if (changeInfo.url ||
Expand Down

0 comments on commit 5961a8e

Please sign in to comment.