From e69537a9f6e1610983b466f784e60dfdf6944516 Mon Sep 17 00:00:00 2001 From: splincode Date: Thu, 16 Jan 2025 10:24:40 +0300 Subject: [PATCH] feat: support fallback context --- projects/ng-polymorpheus/src/directives/outlet.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/ng-polymorpheus/src/directives/outlet.ts b/projects/ng-polymorpheus/src/directives/outlet.ts index f78a95d..d128887 100644 --- a/projects/ng-polymorpheus/src/directives/outlet.ts +++ b/projects/ng-polymorpheus/src/directives/outlet.ts @@ -87,8 +87,8 @@ export class PolymorpheusOutlet implements OnChanges, DoCheck { } return new PolymorpheusContext( - this.context && typeof this.content === 'function' - ? this.content(this.context) + typeof this.content === 'function' + ? this.content(this.context ?? ({} as any)) : this.content, ); }