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`