From 97d75bf934501891dfec233045ac51b76ed4d104 Mon Sep 17 00:00:00 2001 From: SvetoslavTsenov Date: Tue, 6 Nov 2018 11:09:10 +0200 Subject: [PATCH 1/2] fix: crash in deactivate page router outlet --- nativescript-angular/router/page-router-outlet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nativescript-angular/router/page-router-outlet.ts b/nativescript-angular/router/page-router-outlet.ts index a2a3e818e..41b0f7ec0 100644 --- a/nativescript-angular/router/page-router-outlet.ts +++ b/nativescript-angular/router/page-router-outlet.ts @@ -203,7 +203,7 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire } deactivate(): void { - if (!this.outlet.isPageNavigationBack) { + if (!this.outlet && !this.outlet.isPageNavigationBack) { if (isLogEnabled()) { log("Currently not in page back navigation - component should be detached instead of deactivated."); } From 1e02f9a98f43291c60f8a269719423d1b85a6251 Mon Sep 17 00:00:00 2001 From: SvetoslavTsenov Date: Tue, 6 Nov 2018 11:33:10 +0200 Subject: [PATCH 2/2] chore: fix typo --- nativescript-angular/router/page-router-outlet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nativescript-angular/router/page-router-outlet.ts b/nativescript-angular/router/page-router-outlet.ts index 41b0f7ec0..bb2d18c6a 100644 --- a/nativescript-angular/router/page-router-outlet.ts +++ b/nativescript-angular/router/page-router-outlet.ts @@ -203,7 +203,7 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire } deactivate(): void { - if (!this.outlet && !this.outlet.isPageNavigationBack) { + if (!this.outlet || !this.outlet.isPageNavigationBack) { if (isLogEnabled()) { log("Currently not in page back navigation - component should be detached instead of deactivated."); }