1
0
mirror of https://github.com/XFox111/TabsAsideExtension.git synced 2026-04-22 07:58:01 +03:00

Fix: window closes if all tabs were set aside

This commit is contained in:
2025-05-08 06:56:06 +03:00
parent ef94842066
commit 24bf0e88ca
+6
View File
@@ -23,7 +23,13 @@ export default async function saveTabsToCollection(closeTabs: boolean): Promise<
const [collection, tabsToClose] = await createCollectionFromTabs(tabs); const [collection, tabsToClose] = await createCollectionFromTabs(tabs);
if (closeTabs) if (closeTabs)
{
await browser.tabs.create({
active: true,
windowId: tabs[0].windowId
});
await browser.tabs.remove(tabsToClose.map(i => i.id!)); await browser.tabs.remove(tabsToClose.map(i => i.id!));
}
track(closeTabs ? "set_aside" : "save"); track(closeTabs ? "set_aside" : "save");