Skip to content

Commit

Permalink
no need to redirect when removing tab. router handles this fine
Browse files Browse the repository at this point in the history
  • Loading branch information
nielslyngsoe authored and iOvergaard committed Dec 11, 2024
1 parent eec7b01 commit 5f291ba
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,8 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements
#deleteTab(tabId?: string) {
if (!tabId) return;
this.#workspaceContext?.structure.removeContainer(null, tabId);
// TODO: We should only navigate away if it was the last tab and if it was the active one... [NL]
if (this.#tabsStructureHelper?.isOwnerChildContainer(tabId)) {
window.history.replaceState(null, '', this._routerPath + (this._routes[0]?.path ?? '/root'));
if (this._activeTabId === tabId) {
this._activeTabId = undefined;
}
}
async #addTab() {
Expand Down

0 comments on commit 5f291ba

Please sign in to comment.