port fix for #1005 to vnext
This commit is contained in:
parent
4ef303a2c9
commit
b6517c5442
4 changed files with 10 additions and 20 deletions
|
@ -318,8 +318,8 @@ function download(id, keychain, onprogress, canceller) {
|
|||
});
|
||||
|
||||
xhr.addEventListener('progress', function(event) {
|
||||
if (event.lengthComputable && event.target.status === 200) {
|
||||
onprogress([event.loaded, event.total]);
|
||||
if (event.target.status === 200) {
|
||||
onprogress(event.loaded);
|
||||
}
|
||||
});
|
||||
const auth = await keychain.authHeader();
|
||||
|
@ -327,7 +327,7 @@ function download(id, keychain, onprogress, canceller) {
|
|||
xhr.setRequestHeader('Authorization', auth);
|
||||
xhr.responseType = 'blob';
|
||||
xhr.send();
|
||||
onprogress([0, 1]);
|
||||
onprogress(0);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue