Skip to content

Commit 0822ce8

Browse files
committed
Use cleanupRemovedTabs in closeTab too
1 parent 6c4c97a commit 0822ce8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/compass-workspaces/src/stores/workspaces.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,10 +887,11 @@ export const closeTab = (
887887
atIndex: number
888888
): WorkspacesThunkAction<Promise<void>, CloseTabsAction> => {
889889
return async (dispatch, getState) => {
890-
const tab = getState().tabs[atIndex];
890+
const { tabs } = getState();
891+
const tab = tabs[atIndex];
891892
if (canCloseTab(tab) || (await confirmClosingTab())) {
892893
dispatch({ type: WorkspacesActions.CloseTabs, tabIds: [tab.id] });
893-
cleanupLocalAppRegistryForTab(tab?.id);
894+
cleanupRemovedTabs(tabs, getState().tabs);
894895
}
895896
};
896897
};

0 commit comments

Comments
 (0)