【发布时间】:2020-06-22 17:55:42
【问题描述】:
这是我的 Firestore 设置。如您所见,此集合中有文档。
这是我获取集合中文档快照的代码。它总是返回假。有人可以帮我弄清楚如何解决它吗?
firebase.firestore().collection("chatMessages").doc("chatMessages").collection(chatId).get()
.then((snapshot) => {
if (snapshot.exists) { // <- always returning false
console.log("snapshot exists");
}
})
}
【问题讨论】:
标签: firebase google-cloud-firestore