diff --git a/libs/angular-webcomponents/src/lib/utils/webcomponent-bootstrap.utils.ts b/libs/angular-webcomponents/src/lib/utils/webcomponent-bootstrap.utils.ts index 6008c22e..87d87b74 100644 --- a/libs/angular-webcomponents/src/lib/utils/webcomponent-bootstrap.utils.ts +++ b/libs/angular-webcomponents/src/lib/utils/webcomponent-bootstrap.utils.ts @@ -66,8 +66,8 @@ export async function bootstrapRemoteComponent( function getWindowState(): any { const state = window as any - state['@onecx/angular-webcomponents'] = state['@onecx/angular-webcomponents'] || ({} as unknown) - return state + state['@onecx/angular-webcomponents'] ??= {} as unknown + return state['@onecx/angular-webcomponents'] } function setShellZone(injector: Injector) {