diff --git a/npm/ng-packs/packages/components/page/src/page-part.directive.ts b/npm/ng-packs/packages/components/page/src/page-part.directive.ts index 3e59b7aee2..c228189e0f 100644 --- a/npm/ng-packs/packages/components/page/src/page-part.directive.ts +++ b/npm/ng-packs/packages/components/page/src/page-part.directive.ts @@ -66,11 +66,11 @@ export class PagePartDirective implements OnInit, OnDestroy, OnChanges { } ngOnDestroy() { + this.clearSubscription(); + if (this.renderLogic?.onDestroy) { this.renderLogic.onDestroy(this.type, this.injector, this.context); } - - this.clearSubscription(); } shouldRender(type: string) {