angular / angularfire

Angular + Firebase = ❤️
https://firebaseopensource.com/projects/angular/angularfire2
MIT License
7.67k stars 2.19k forks source link

DocumentReference in a doc obtained with snapshotChanges arent instanceof firebase.firestore.DocumentReference #2690

Closed rulamon closed 3 years ago

rulamon commented 3 years ago

Version info

Angular: 11.0.0

Firebase: 8.1.1

AngularFire: 6.1.1 and 6.1.2

How to reproduce these conditions

https://stackblitz.com/edit/angularfire-docref-bug?file=src/app/app.component.html

Steps to set up and reproduce

Retrieve a collection with a document containing a DocumentReference through AngularFirestore.collection.snapshotChanges, and check document.docRef instanceof firebase.firestore.DocumentReference

Debug output

Errors in the JavaScript console

Output from firebase.database().enableLogging(true);

Screenshots

Expected behavior

docRef instanceof firebase.firestore.DocumentReference should return true

Actual behavior

docRef instanceof firebase.firestore.DocumentReference returns false, this is a regression

jamesdaniels commented 3 years ago

Not an AngularFire issue, see https://stackblitz.com/edit/angularfire-docref-bug-kbsb5t?file=src%2Fapp%2Fapp.component.ts please open with the Firebase JS SDK.

jamesdaniels commented 3 years ago

Perhaps this is the underlying issue https://github.com/firebase/firebase-js-sdk/issues/4125