diff --git a/webextensions/sidebar/tab-preview-tooltip.js b/webextensions/sidebar/tab-preview-tooltip.js index 32a00761d..740b13294 100644 --- a/webextensions/sidebar/tab-preview-tooltip.js +++ b/webextensions/sidebar/tab-preview-tooltip.js @@ -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',