mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-24 04:24:52 +08:00
fixed storage task
This commit is contained in:
@@ -42,7 +42,7 @@ export default class StorageTask {
|
||||
ref: StorageReference
|
||||
storage: StorageReference.storage
|
||||
path: StorageReference.path
|
||||
then: Promise<*>
|
||||
then: () => Promise<*>
|
||||
catch: () => Promise<*>
|
||||
|
||||
constructor(type: typeof UPLOAD_TASK | typeof DOWNLOAD_TASK, promise: Promise<*>, storageRef: StorageReference) {
|
||||
@@ -52,7 +52,7 @@ export default class StorageTask {
|
||||
this.path = storageRef.path;
|
||||
|
||||
// 'proxy' original promise
|
||||
this.then = promise.then(this._interceptSnapshotEvent);
|
||||
this.then = promise.then.bind(promise);
|
||||
this.catch = promise.catch.bind(promise);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user