diff --git a/src/app/shared/theme-support/themed.component.ts b/src/app/shared/theme-support/themed.component.ts index 973a3a26f6..d75568e0ba 100644 --- a/src/app/shared/theme-support/themed.component.ts +++ b/src/app/shared/theme-support/themed.component.ts @@ -91,11 +91,10 @@ export abstract class ThemedComponent implements OnInit, OnDestroy, OnChanges ).subscribe((constructor: GenericConstructor) => { const factory = this.resolver.resolveComponentFactory(constructor); - const contentNodes = [[...this.themedElementContent.nativeElement.children].map(node => node)] || undefined; - - this.compRef = this.vcr.createComponent(factory, undefined, undefined, contentNodes); + this.compRef = this.vcr.createComponent(factory, undefined, undefined, [this.themedElementContent.nativeElement.children]); this.connectInputsAndOutputs(); this.cdr.markForCheck(); + this.themedElementContent.nativeElement.remove(); }); }