diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-structure-manager.class.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-structure-manager.class.ts index 41cefe4ad9..69e432a5ef 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-structure-manager.class.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-structure-manager.class.ts @@ -391,7 +391,7 @@ export class UmbContentTypeStructureManager< throw new Error('Could not find the Content Type to remove container from'); } const frozenContainers = contentType.containers ?? []; - const containers = frozenContainers.filter((x) => x.id !== containerId || x.parent?.id !== containerId); + const containers = frozenContainers.filter((x) => x.id !== containerId && x.parent?.id !== containerId); const frozenProperties = contentType.properties ?? []; const properties = frozenProperties.filter((x) => x.container?.id !== containerId); diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts index e3bcdb1266..015212cef9 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts @@ -228,7 +228,7 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements this._routes = routes; } - async #requestRemoveTab(tab: UmbPropertyTypeContainerModel | undefined) { + async #requestDeleteTab(tab: UmbPropertyTypeContainerModel | undefined) { // TODO: Localize this: const modalData: UmbConfirmModalData = { headline: 'Delete tab', @@ -248,9 +248,9 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements await umbConfirmModal(this, modalData); - this.#remove(tab?.id); + this.#deleteTab(tab?.id); } - #remove(tabId?: string) { + #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] @@ -495,7 +495,7 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements @click=${(e: MouseEvent) => { e.stopPropagation(); e.preventDefault(); - this.#requestRemoveTab(tab); + this.#requestDeleteTab(tab); }} compact>