From 2b9c7f814f2533dc8e602c7f941efcff655e2fc5 Mon Sep 17 00:00:00 2001 From: Obumuneme Nwabude Date: Tue, 25 May 2021 10:12:40 +0100 Subject: [PATCH] update docs/firestore/documents.md I had this error that doc does not exist on payload anytime I access DocumentData from snapshotChanges(). However, treating payload as DocumentSnapshot (using the data() method on it directly), rather than treating it as DocumentChange, solved the problem. So that's why I feel that the type of payload is DocumentSnapshot and not DocumentChange --- docs/firestore/documents.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/firestore/documents.md b/docs/firestore/documents.md index 4e43e7843..4f2cfadd6 100644 --- a/docs/firestore/documents.md +++ b/docs/firestore/documents.md @@ -45,7 +45,7 @@ A `DocumentChangeAction` gives you the `type` and `payload` properties. The `typ interface DocumentChangeAction { //'added' | 'modified' | 'removed'; type: DocumentChangeType; - payload: DocumentChange; + payload: DocumentSnapshot; } interface DocumentChange {