Skip to content

Commit

Permalink
fix(storage): error state not represent in UploadTaskSnapshot (#2665)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdaniels committed Nov 18, 2020
1 parent 0f7d439 commit 2ce41aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/storage/observable/fromTask.ts
Expand Up @@ -6,7 +6,10 @@ export function fromTask(task: UploadTask) {
const progress = (snap: UploadTaskSnapshot) => subscriber.next(snap);
const error = e => subscriber.error(e);
const complete = () => subscriber.complete();
task.on('state_changed', progress, error, () => {
task.on('state_changed', progress, (e) => {
progress(task.snapshot);
error(e);
}, () => {
progress(task.snapshot);
complete();
});
Expand Down

0 comments on commit 2ce41aa

Please sign in to comment.