commit fd11568e66968208de4f58093bbabbffc9d1e983
parent 5389464605fe7f673e05034aa89dfc708d05bc4d
Author: RobinLinus <robinlinus@users.noreply.github.com>
Date: Thu, 12 Aug 2021 15:38:02 +0200
Fix #334, Fix 331
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/client/scripts/network.js b/client/scripts/network.js
@@ -487,6 +487,8 @@ class FileDigester {
this._bytesReceived += chunk.byteLength || chunk.size;
const totalChunks = this._buffer.length;
this.progress = this._bytesReceived / this._size;
+ if (isNaN(this.progress)) this.progress = 1
+
if (this._bytesReceived < this._size) return;
// we are done
let blob = new Blob(this._buffer, { type: this._mime });