mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-29 04:35:43 +08:00
Merge branch 'master' of https://github.com/invertase/react-native-firebase
This commit is contained in:
@@ -204,8 +204,11 @@ export default class Reference extends ReferenceBase {
|
||||
return new Promise((resolve, reject) => {
|
||||
const onCompleteWrapper = (error, committed, snapshotData) => {
|
||||
if (isFunction(onComplete)) {
|
||||
if (error) return onComplete(error, committed, null);
|
||||
return onComplete(null, committed, new Snapshot(this, snapshotData));
|
||||
if (error) {
|
||||
onComplete(error, committed, null);
|
||||
} else {
|
||||
onComplete(null, committed, new Snapshot(this, snapshotData));
|
||||
}
|
||||
}
|
||||
|
||||
if (error) return reject(error);
|
||||
|
||||
Reference in New Issue
Block a user