mirror of https://github.com/shadowfacts/type.git
Fix getting correct chunks
This commit is contained in:
parent
0f9811d2c7
commit
019e985587
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue