File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,23 @@ export function observeInsideAngular<T>(obs$: Observable<T>): Observable<T> {
9292}
9393
9494export function keepUnstableUntilFirst < T > ( obs$ : Observable < T > ) : Observable < T > {
95- return obs$ . pipe ( pendingUntilEvent ( getSchedulers ( ) . injector ) ) ;
95+ return ɵkeepUnstableUntilFirstFactory ( getSchedulers ( ) ) ( obs$ ) ;
96+ }
97+
98+ /**
99+ * Operator to block the zone until the first value has been emitted or the observable
100+ * has completed/errored. This is used to make sure that universal waits until the first
101+ * value from firebase but doesn't block the zone forever since the firebase subscription
102+ * is still alive.
103+ */
104+ export function ɵkeepUnstableUntilFirstFactory (
105+ _schedulers : ɵAngularFireSchedulers
106+ ) {
107+ return function keepUnstableUntilFirst < T > (
108+ obs$ : Observable < T >
109+ ) : Observable < T > {
110+ return obs$ . pipe ( pendingUntilEvent ( getSchedulers ( ) . injector ) ) ;
111+ }
96112}
97113
98114const zoneWrapFn = (
You can’t perform that action at this time.
0 commit comments