2
0
mirror of synced 2025-01-11 14:44:12 +00:00

fixed storage task

This commit is contained in:
Alexander Kuttig 2017-05-14 14:24:10 +02:00
parent 2d4bc30664
commit c35ed6f49d

View File

@ -42,7 +42,7 @@ export default class StorageTask {
ref: StorageReference ref: StorageReference
storage: StorageReference.storage storage: StorageReference.storage
path: StorageReference.path path: StorageReference.path
then: Promise<*> then: () => Promise<*>
catch: () => Promise<*> catch: () => Promise<*>
constructor(type: typeof UPLOAD_TASK | typeof DOWNLOAD_TASK, promise: Promise<*>, storageRef: StorageReference) { constructor(type: typeof UPLOAD_TASK | typeof DOWNLOAD_TASK, promise: Promise<*>, storageRef: StorageReference) {
@ -52,7 +52,7 @@ export default class StorageTask {
this.path = storageRef.path; this.path = storageRef.path;
// 'proxy' original promise // 'proxy' original promise
this.then = promise.then(this._interceptSnapshotEvent); this.then = promise.then.bind(promise);
this.catch = promise.catch.bind(promise); this.catch = promise.catch.bind(promise);
} }