Skip to content

Commit

Permalink
fix: fix clearing uploading status before upload success event (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
sosa-vaadin committed Jul 28, 2021
1 parent f6b9adc commit 1d93526
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/vaadin-upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@
}

const ini = Date.now();
const xhr = file.xhr = this._createXhr(file);
const xhr = file.xhr = this._createXhr();

let stalledId, last;
// onprogress is called always after onreadystatechange
Expand All @@ -589,7 +589,6 @@
} else {
file.loadedStr = file.totalStr;
file.status = this.i18n.uploading.status.processing;
file.uploading = false;
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
expect(f.loaded).to.be.equal(100000);
expect(f.size).to.be.equal(100000);
expect(f.speed).to.be.gt(100);
expect(f.uploading).not.to.be.ok;
expect(f.uploading).to.be.ok;
done();
}
});
Expand Down

0 comments on commit 1d93526

Please sign in to comment.