Skip to content

Commit

Permalink
fix(compat/database): Zone should be destabilized on get (#2923)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdaniels committed Sep 7, 2021
1 parent 2788980 commit c006da8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/compat/firestore/collection-group/collection-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { from, Observable } from 'rxjs';
import { fromCollectionRef } from '../observable/fromRef';
import { filter, map, scan } from 'rxjs/operators';
import firebase from 'firebase/compat/app';
import { keepUnstableUntilFirst, observeInsideAngular } from '@angular/fire';
import { keepUnstableUntilFirst } from '@angular/fire';

import { DocumentChangeAction, DocumentChangeType, DocumentData, Query } from '../interfaces';
import { validateEventsArray } from '../collection/collection';
Expand Down Expand Up @@ -108,7 +108,7 @@ export class AngularFirestoreCollectionGroup<T = DocumentData> {
*/
get(options?: firebase.firestore.GetOptions) {
return from(this.query.get(options)).pipe(
observeInsideAngular
keepUnstableUntilFirst
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/compat/firestore/collection/collection.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { from, Observable } from 'rxjs';
import { filter, map, pairwise, scan, startWith } from 'rxjs/operators';
import firebase from 'firebase/compat/app';
import { keepUnstableUntilFirst, observeInsideAngular } from '@angular/fire';
import { keepUnstableUntilFirst } from '@angular/fire';

import { CollectionReference, DocumentChangeAction, DocumentChangeType, DocumentData, DocumentReference, Query } from '../interfaces';
import { docChanges, sortedChanges } from './changes';
Expand Down Expand Up @@ -129,7 +129,7 @@ export class AngularFirestoreCollection<T = DocumentData> {
*/
get(options?: firebase.firestore.GetOptions) {
return from(this.query.get(options)).pipe(
observeInsideAngular,
keepUnstableUntilFirst,
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/compat/firestore/document/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { from, Observable } from 'rxjs';
import { keepUnstableUntilFirst } from '@angular/fire';
import { Action, DocumentData, DocumentReference, DocumentSnapshot, QueryFn, SetOptions } from '../interfaces';
import { fromDocRef } from '../observable/fromRef';
import { map, observeOn } from 'rxjs/operators';
import { map } from 'rxjs/operators';
import { AngularFirestore, associateQuery } from '../firestore';
import { AngularFirestoreCollection } from '../collection/collection';
import firebase from 'firebase/compat/app';
Expand Down Expand Up @@ -102,7 +102,7 @@ export class AngularFirestoreDocument<T = DocumentData> {
*/
get(options?: firebase.firestore.GetOptions) {
return from(this.ref.get(options)).pipe(
observeOn(this.afs.schedulers.insideAngular),
keepUnstableUntilFirst,
);
}
}

0 comments on commit c006da8

Please sign in to comment.