From 80773bdd07ac2a9c33c1f2aac343682e83f8cfb7 Mon Sep 17 00:00:00 2001 From: Tomas Trajan Date: Tue, 29 May 2018 11:35:25 +0800 Subject: [PATCH] fix(app): takeUntil should be always used as the last operator to prevent potential leaks --- src/app/app.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 94d2ceb62..818859507 100755 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -104,11 +104,11 @@ export class AppComponent implements OnInit, OnDestroy { private subscribeToRouterEvents() { this.router.events .pipe( - takeUntil(this.unsubscribe$), filter( event => event instanceof ActivationEnd || event instanceof NavigationEnd - ) + ), + takeUntil(this.unsubscribe$) ) .subscribe(event => { if (event instanceof ActivationEnd) {