port fix for #1005 to vnext

This commit is contained in:
Danny Coates 2018-11-16 13:33:40 -08:00
parent 4ef303a2c9
commit b6517c5442
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
4 changed files with 10 additions and 20 deletions

View file

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