From 587fb4f0c620453f5dc4f56a5bdcab96e404c91a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 1 Jul 2024 10:42:26 +0200 Subject: [PATCH] do not render slot in extension-with-api-slot --- .../extension-with-api-slot.element.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/extension-registry/components/extension-with-api-slot/extension-with-api-slot.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/extension-registry/components/extension-with-api-slot/extension-with-api-slot.element.ts index d7d5fc09ab..539c1ac8e2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/extension-registry/components/extension-with-api-slot/extension-with-api-slot.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/extension-registry/components/extension-with-api-slot/extension-with-api-slot.element.ts @@ -26,7 +26,7 @@ export class UmbExtensionWithApiSlotElement extends UmbLitElement { #extensionsController?: UmbExtensionsElementAndApiInitializer; @state() - private _permitted: Array = []; + private _permitted?: Array; /** * The type or types of extensions to render. @@ -178,13 +178,13 @@ export class UmbExtensionWithApiSlotElement extends UmbLitElement { } override render() { - return this._permitted.length > 0 + return this._permitted ? this._permitted.length > 0 ? repeat( this._permitted, (ext) => ext.alias, (ext, i) => (this.renderMethod ? this.renderMethod(ext, i) : ext.component), ) - : html``; + : html`` : ''; } static override styles = css`