mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-01-12 22:50:20 +08:00
[js] fixed issue with StorageTask.then/.catch
This commit is contained in:
@@ -101,11 +101,11 @@ export const statics = {
|
||||
STATE_CHANGED: 'state_changed',
|
||||
},
|
||||
TaskState: {
|
||||
RUNNING: 'RUNNING',
|
||||
PAUSED: 'PAUSED',
|
||||
SUCCESS: 'SUCCESS',
|
||||
CANCELED: 'CANCELED',
|
||||
ERROR: 'ERROR',
|
||||
RUNNING: 'running',
|
||||
PAUSED: 'paused',
|
||||
SUCCESS: 'success',
|
||||
CANCELLED: 'cancelled',
|
||||
ERROR: 'error',
|
||||
},
|
||||
Native: {
|
||||
MAIN_BUNDLE_PATH: FirebaseStorage.MAIN_BUNDLE_PATH,
|
||||
|
||||
@@ -13,8 +13,8 @@ export default class StorageTask {
|
||||
this.path = storageRef.path;
|
||||
|
||||
// 'proxy' original promise
|
||||
this.then = promise.then;
|
||||
this.catch = promise.catch;
|
||||
this.then = promise.then.bind(promise);
|
||||
this.catch = promise.catch.bind(promise);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user