Skip to content

Commit 3fbbb7d

Browse files
jymdmanjamesdaniels
authored andcommitted
fix(core): Update to rxjs pipeable operators (#1620)
1 parent 5694e7c commit 3fbbb7d

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/core/angularfire2.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Reference } from '@firebase/database-types';
33
import { TestBed, inject, withModule, async } from '@angular/core/testing';
44
import { ReflectiveInjector, Provider, PlatformRef, NgModule, Compiler, ApplicationRef, CompilerFactory } from '@angular/core';
55
import { FirebaseApp, FirebaseAppConfig, AngularFireModule } from 'angularfire2';
6-
import { Subscription } from 'rxjs/Subscription';
6+
import { Subscription } from 'rxjs';
77
import { COMMON_CONFIG } from './test-config';
88
import { BrowserModule } from '@angular/platform-browser';
99

src/core/angularfire2.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { InjectionToken, NgZone } from '@angular/core';
2-
import { Observable } from 'rxjs/Observable';
3-
import { Subscription } from 'rxjs/Subscription';
4-
import { queue } from 'rxjs/scheduler/queue';
52
import { isPlatformServer } from '@angular/common';
6-
import { observeOn } from 'rxjs/operator/observeOn';
3+
import { Observable, Subscription } from 'rxjs';
4+
import { queue } from 'rxjs/scheduler/queue';
5+
import { first } from 'rxjs/operators';
76

87
import firebase from '@firebase/app';
98
import { FirebaseApp, FirebaseOptions } from '@firebase/app-types';
109

1110
import {} from 'zone.js';
12-
import 'rxjs/add/operator/first';
1311

1412
export const FirebaseAppName = new InjectionToken<string>('angularfire2.appName');
1513
export const FirebaseAppConfig = new InjectionToken<FirebaseOptions>('angularfire2.config');
@@ -28,7 +26,7 @@ export class FirebaseZoneScheduler {
2826
return new Observable<T>(subscriber => {
2927
const noop = () => {};
3028
const task = Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop);
31-
obs$.first().subscribe(() => this.zone.runOutsideAngular(() => task.invoke()));
29+
obs$.pipe(first()).subscribe(() => this.zone.runOutsideAngular(() => task.invoke()));
3230
return obs$.subscribe(subscriber);
3331
});
3432
} else {

0 commit comments

Comments
 (0)