Skip to content

Commit

Permalink
fix: resolve issue with inability to close Pinned tab. closes #26
Browse files Browse the repository at this point in the history
  • Loading branch information
kirklin committed May 9, 2024
1 parent f2e8db6 commit b87e11f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/admin/src/store/modules/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ export const useTabsStore = defineStore({
}
},
close(isPinned: boolean, tab: Tab) {
const targetTabs = isPinned ? this.pinnedTabs : this.tabs;
this.tabs = targetTabs.filter(currentTab => currentTab.fullPath !== tab.fullPath);
if (isPinned) {
this.pinnedTabs = this.pinnedTabs.filter(currentTab => currentTab.fullPath !== tab.fullPath);
}
this.tabs = this.tabs.filter(currentTab => currentTab.fullPath !== tab.fullPath);
},
closeTab(tab: Tab) {
this.close(false, tab);
Expand Down

0 comments on commit b87e11f

Please sign in to comment.