Skip to content

Commit a35d41e

Browse files
Shabbirjodhpurthatfiredev
authored andcommitted
Update get_document.js (#335)
We get the snapshot of data using 'getDoc()' and get result 'docSnap' And then we perform check on this 'docSnap' in the if else block So in the else block the comment should ne docSnap.data() will ne undefined
1 parent b90dd7c commit a35d41e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

firestore-next/test.firestore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ describe("firestore", () => {
583583
if (docSnap.exists()) {
584584
console.log("Document data:", docSnap.data());
585585
} else {
586-
// doc.data() will be undefined in this case
586+
// docSnap.data() will be undefined in this case
587587
console.log("No such document!");
588588
}
589589
// [END get_document]

snippets/firestore-next/test-firestore/get_document.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const docSnap = await getDoc(docRef);
1313
if (docSnap.exists()) {
1414
console.log("Document data:", docSnap.data());
1515
} else {
16-
// doc.data() will be undefined in this case
16+
// docSnap.data() will be undefined in this case
1717
console.log("No such document!");
1818
}
1919
// [END get_document_modular]

0 commit comments

Comments
 (0)