1
0
mirror of https://github.com/shadowfacts/type.git synced 2025-02-05 10:11:24 +00:00

Fix getting correct chunks

This commit is contained in:
Shadowfacts 2016-10-01 17:23:59 -04:00
parent 0f9811d2c7
commit 019e985587
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5

View File

@ -300,7 +300,7 @@ function getChunk(code) {
.then((val) => {
if (val && val[filePath] && val[filePath].chunk) {
let chunk = val[filePath].chunk;
let totalChunks = Math.floor(lines.length / 50);
let totalChunks = Math.ceil(lines.length / 50);
if (chunk == totalChunks - 1) {
return lines.slice(totalChunks - (lines.length % 50), lines.length);
} else {