aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app/assets/javascripts/activestorage.js
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/app/assets/javascripts/activestorage.js')
-rw-r--r--activestorage/app/assets/javascripts/activestorage.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/app/assets/javascripts/activestorage.js b/activestorage/app/assets/javascripts/activestorage.js
index a22f644238..d3fd795a3a 100644
--- a/activestorage/app/assets/javascripts/activestorage.js
+++ b/activestorage/app/assets/javascripts/activestorage.js
@@ -484,7 +484,7 @@
}, {
key: "readNextChunk",
value: function readNextChunk() {
- if (this.chunkIndex < this.chunkCount) {
+ if (this.chunkIndex < this.chunkCount || this.chunkIndex == 0 && this.chunkCount == 0) {
var start = this.chunkIndex * this.chunkSize;
var end = Math.min(start + this.chunkSize, this.file.size);
var bytes = fileSlice.call(this.file, start, end);