fix(client) load: Upload stuck for zero byte files (#359)

This commit is contained in:
coderaiser 2021-12-09 14:10:24 +02:00
parent 21e9736c81
commit ed14250fe2

View file

@ -120,8 +120,10 @@ module.exports.put = (url, body) => {
if (!over)
return;
if (xhr.status === OK)
if (xhr.status === OK) {
emitter.emit('progress', 100);
return emitter.emit('end');
}
const error = Error(xhr.responseText);
emitter.emit('error', error);