mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-05 09:29:19 +08:00
Fix #2449
This commit is contained in:
@@ -137,9 +137,9 @@ export default class FirestoreDocumentReference {
|
||||
throw new Error(`firebase.firestore().doc().onSnapshot(*) ${e.message}`);
|
||||
}
|
||||
|
||||
function handleSuccess(querySnapshot) {
|
||||
callback(querySnapshot, null);
|
||||
onNext(querySnapshot);
|
||||
function handleSuccess(documentSnapshot) {
|
||||
callback(documentSnapshot, null);
|
||||
onNext(documentSnapshot);
|
||||
}
|
||||
|
||||
function handleError(error) {
|
||||
@@ -157,7 +157,6 @@ export default class FirestoreDocumentReference {
|
||||
} else {
|
||||
const documentSnapshot = new FirestoreDocumentSnapshot(
|
||||
this._firestore,
|
||||
this,
|
||||
event.body.snapshot,
|
||||
);
|
||||
handleSuccess(documentSnapshot);
|
||||
|
||||
Reference in New Issue
Block a user