[js] fixed issue with StorageTask.then/.catch

This commit is contained in:
Salakar
2017-03-22 23:23:48 +00:00
parent d15ae5cb27
commit f1655c1ea6
2 changed files with 7 additions and 7 deletions

View File

@@ -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,

View File

@@ -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);
}
/**