[firestore] Bring document change in sync with web sdk
This commit is contained in:
parent
469bd318a2
commit
a89e741581
@ -21,8 +21,8 @@ export default class DocumentChange {
|
||||
_oldIndex: number;
|
||||
_type: string;
|
||||
|
||||
constructor(nativeData: DocumentChangeNativeData) {
|
||||
this._document = nativeData.document;
|
||||
constructor(firestore: Object, nativeData: DocumentChangeNativeData) {
|
||||
this._document = new DocumentSnapshot(firestore, nativeData.document);
|
||||
this._newIndex = nativeData.newIndex;
|
||||
this._oldIndex = nativeData.oldIndex;
|
||||
this._type = nativeData.type;
|
||||
|
@ -25,7 +25,7 @@ export default class QuerySnapshot {
|
||||
_query: Query;
|
||||
|
||||
constructor(firestore: Object, query: Query, nativeData: QuerySnapshotNativeData) {
|
||||
this._changes = nativeData.changes.map(change => new DocumentChange(change));
|
||||
this._changes = nativeData.changes.map(change => new DocumentChange(firestore, change));
|
||||
this._docs = nativeData.documents.map(doc => new DocumentSnapshot(firestore, doc));
|
||||
this._metadata = nativeData.metadata;
|
||||
this._query = query;
|
||||
|
Loading…
x
Reference in New Issue
Block a user