refactor: clean up unsafe takeUntil usages (#14185)

Cleans up some usages of `takeUntil` which are unsafe, because they're not at the end of the operator chain.
This commit is contained in:
Kristiyan Kostadinov
2018-11-27 16:26:27 +01:00
committed by Jeremy Elbourn
parent 89a4c9cbe1
commit 5430e7cca5
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -116,9 +116,9 @@ export class BreakpointObserver implements OnDestroy {
},
() => mql.removeListener(queryListener))
.pipe(
takeUntil(this._destroySubject),
startWith(mql),
map((nextMql: MediaQueryList) => ({query, matches: nextMql.matches}))
map((nextMql: MediaQueryList) => ({query, matches: nextMql.matches})),
takeUntil(this._destroySubject)
);
// Add the MediaQueryList to the set of queries.
+1 -1
View File
@@ -572,8 +572,8 @@ export class MatDrawerContainer implements AfterContentInit, DoCheck, OnDestroy
*/
private _watchDrawerToggle(drawer: MatDrawer): void {
drawer._animationStarted.pipe(
filter((event: AnimationEvent) => event.fromState !== event.toState),
takeUntil(this._drawers.changes),
filter((event: AnimationEvent) => event.fromState !== event.toState)
)
.subscribe((event: AnimationEvent) => {
// Set the transition class on the container so that the animations occur. This should not