Browse Source

Fix Range Header processing logic for NetworkStreamer (#709)

pull/714/head
Jacky Jiang 5 years ago committed by Sergi Almacellas Abellana
parent
commit
9b54b11fe2
  1. 5
      papaparse.js

5
papaparse.js

@ -669,8 +669,6 @@ License: MIT
if (IS_WORKER && xhr.status === 0) if (IS_WORKER && xhr.status === 0)
this._chunkError(); this._chunkError();
else
this._start += this._config.chunkSize;
}; };
this._chunkLoaded = function() this._chunkLoaded = function()
@ -684,7 +682,8 @@ License: MIT
return; return;
} }
this._finished = !this._config.chunkSize || this._start > getFileSize(xhr); this._start += xhr.responseText.length;
this._finished = !this._config.chunkSize || this._start >= getFileSize(xhr);
this.parseChunk(xhr.responseText); this.parseChunk(xhr.responseText);
}; };

Loading…
Cancel
Save