Merge pull request #519 from MahmoudAboelazm/fix_FileReader_error

fix error: Failed to execute 'readAsArrayBuffer' on 'FileReader': The…
This commit is contained in:
RobinLinus 2022-10-21 18:59:26 +02:00 committed by GitHub
commit 15f28e4a77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

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