From 019e9855872ea1a7c87be69b5efe43a756862f2f Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 1 Oct 2016 17:23:59 -0400 Subject: [PATCH] Fix getting correct chunks --- js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index 944c200..47684e9 100644 --- a/js/main.js +++ b/js/main.js @@ -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 {