Skip to content

Commit

Permalink
Suppress unhandled error from closed tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Dec 9, 2024
1 parent f6e049e commit 5e5bb35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions webextensions/sidebar/tab-preview-tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,9 @@ async function onTabSubstanceLeave(event) {
activeTab.id :
null;

if (!event.target.tab) // the tab was closed while waiting
return;

log(`onTabSubstanceLeave(${event.target.tab.id}}) hide tab preview in ${targetTabId || 'sidebar'}`);
sendTabPreviewMessage(targetTabId, {
type: 'treestyletab:hide-tab-preview',
Expand Down

0 comments on commit 5e5bb35

Please sign in to comment.