fix error: Failed to execute 'readAsArrayBuffer' on 'FileReader': The object is already busy reading Blobs

This commit is contained in:
MahmoudAboelazm 2022-10-21 02:54:14 +02:00
parent 2e0619fbba
commit 7bb4c1916a

View file

@ -448,7 +448,8 @@ class FileChunker {
this._offset += chunk.byteLength;
this._partitionSize += chunk.byteLength;
this._onChunk(chunk);
if (this._isPartitionEnd() || this.isFileEnd()) {
if (this.isFileEnd()) return;
if (this._isPartitionEnd()) {
this._onPartitionEnd(this._offset);
return;
}