aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2018-07-27 00:20:42 -0400
committerGeorge Claghorn <george@basecamp.com>2018-07-27 00:20:47 -0400
commit046bd75b0e5f7ec35f5136ccaaec6676dc1b88cc (patch)
treeefbfcbdc2ab87f1212fcb7aa847f863e0d75ad06 /activestorage/app
parent195463736cfe21971171aa911dfb45d25dc87354 (diff)
downloadrails-046bd75b0e5f7ec35f5136ccaaec6676dc1b88cc.tar.gz
rails-046bd75b0e5f7ec35f5136ccaaec6676dc1b88cc.tar.bz2
rails-046bd75b0e5f7ec35f5136ccaaec6676dc1b88cc.zip
Clarify condition
&& binds tighter than || in JavaScript, but we ought not expect readers to remember language trivia.
Diffstat (limited to 'activestorage/app')
-rw-r--r--activestorage/app/javascript/activestorage/file_checksum.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/app/javascript/activestorage/file_checksum.js b/activestorage/app/javascript/activestorage/file_checksum.js
index d46f276957..a9dbef69ea 100644
--- a/activestorage/app/javascript/activestorage/file_checksum.js
+++ b/activestorage/app/javascript/activestorage/file_checksum.js
@@ -39,7 +39,7 @@ export class FileChecksum {
}
readNextChunk() {
- if (this.chunkIndex < this.chunkCount || this.chunkIndex == 0 && this.chunkCount == 0) {
+ if (this.chunkIndex < this.chunkCount || (this.chunkIndex == 0 && this.chunkCount == 0)) {
const start = this.chunkIndex * this.chunkSize
const end = Math.min(start + this.chunkSize, this.file.size)
const bytes = fileSlice.call(this.file, start, end)