Skip to content

Commit 65c3d8b

Browse files
committed
metadata contains hasPendingWrites
1 parent 8e0b3bb commit 65c3d8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/firestore/src/api/snapshot.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ export class DocumentSnapshot<
520520
document.data.value.mapValue.fields,
521521
'previous'
522522
);
523-
if (documentData.hasPendingWrites) {
523+
if (this.metadata.hasPendingWrites) {
524524
throw new FirestoreError(
525525
Code.FAILED_PRECONDITION,
526526
'DocumentSnapshot.toJSON attempted to serialize a document with pending writes. ' +
@@ -710,7 +710,7 @@ export class QuerySnapshot<
710710
doc._document.data.value.mapValue.fields,
711711
'previous'
712712
);
713-
if (documentData.hasPendingWrites) {
713+
if (this.metadata.hasPendingWrites) {
714714
throw new FirestoreError(
715715
Code.FAILED_PRECONDITION,
716716
'QuerySnapshot.toJSON attempted to serialize a document with pending writes. ' +

0 commit comments

Comments
 (0)