ngx-rocket / generator-ngx-rocket

:rocket: Extensible Angular 14+ enterprise-grade project generator
https://ngx-rocket.github.io/
MIT License
1.53k stars 217 forks source link

fix: avoid potential never-ending subscriptions for page titles #471

Closed captaincaius closed 5 years ago

captaincaius commented 5 years ago

I'm not positive this is needed and haven't measured an actual problem, but better safe than sorry and I think it's more expressive of intent to use switchMap anyway.

bursauxa commented 5 years ago

Travis errors are the same as the ones we have on current master branch, and the change looks like a net positive (I found this source in French that felt educating: https://guide-angular.wishtack.io/angular/observables/operateurs/mergemap-and-switchmap). I'm going ahead with the merge.

sinedied commented 5 years ago

I don't remember why mergeMap was used in the first place, probably part of the legacy now 😄 Thanks for the fix