Skip to content

Commit

Permalink
Merge pull request SnapDrop#519 from MahmoudAboelazm/fix_FileReader_e…
Browse files Browse the repository at this point in the history
…rror

fix error: Failed to execute 'readAsArrayBuffer' on 'FileReader': The…
  • Loading branch information
RobinLinus authored Oct 21, 2022
2 parents 2e0619f + 7bb4c19 commit 15f28e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/scripts/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 15f28e4

Please sign in to comment.