Skip to content

Commit

Permalink
automatically add new tab if last tab is removed
Browse files Browse the repository at this point in the history
  • Loading branch information
amanharwara committed Mar 5, 2024
1 parent 559368a commit 15d41c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/stores/tabs/solid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export function removeTab(tab: Tab) {
updateAndSyncTabStore("previouslyClosedTab", tab);
if (tabStore.tabs.length > 0) {
updateAndSyncTabStore("selectedTabId", tabStore.tabs[0].id);
} else {
addTab(getDefaultTab());
}
}

Expand Down

0 comments on commit 15d41c9

Please sign in to comment.