Closed
Description
Describe your environment
- Operating System version: osx
- Browser version: edge 87
- Firebase SDK version: 8.1.1
- Firebase Product: firestore
Describe the problem
References read through a DocumentSnapshot.data()
are not DocumentReference
and are missing the onSnapshot
function. This was present on v7 and it's useful for Vuefire to automatically listen to changes in nested references
Steps to reproduce:
- Create a document with a reference to another document
- Listen to changes through
onSnapshot
Relevant Code:
(The stackblitz demo doesn't seem to work after upgrading firebase to 8.1.1). hopefull this code should give more context about seems like a regression
var db = firebase
.initializeApp({
projectId: "vue-fire-store",
databaseURL: "https://vue-fire-store.firebaseio.com"
})
.firestore();
db.collection("tweets").onSnapshot(snaphot => {
const changes = snapshot.docChanges();
changes.added.forEach(({ doc }) => {
doc.data().tweet.onSnaphot // undefined
})
});