Skip to content

Commit ccd34b0

Browse files
committed
Fix chunk slicing
slice() takes a start and end rather than start and length
1 parent d5352e0 commit ccd34b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/node/base/requests/file.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
const chunks = [];
8282

8383
for(let i = 0; i < chunksCount; i++) {
84-
const chunk = mainChunk.slice(i * client.CHUNK_SIZE, client.CHUNK_SIZE);
84+
const chunk = mainChunk.slice(i * client.CHUNK_SIZE, (i + 1) * client.CHUNK_SIZE);
8585
chunks.push(chunk);
8686
}
8787

0 commit comments

Comments
 (0)