Skip to content

Commit

Permalink
fix(app): takeUntil should be always used as the last operator to pre…
Browse files Browse the repository at this point in the history
…vent potential leaks
  • Loading branch information
tomastrajan committed May 29, 2018
1 parent 376f27e commit 80773bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 80773bd

Please sign in to comment.