Skip to content

Commit

Permalink
Prevent infinite loop on copying a tab with its id as a openerTabId
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed May 18, 2024
1 parent 0f795ef commit 5c4dc22
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/Context.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ export class Context {

try {
const collectDescendants = async tab => {
if (tab.openerTabId == tab.id)
return [];
log('collectDescendants: collecting for a tab ', tab);
const childTabs = await browser.tabs.query({
windowId: tab.windowId,
openerTabId: tab.id,
Expand Down

0 comments on commit 5c4dc22

Please sign in to comment.