mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-03 18:24:30 +08:00
fix: 构建问题
This commit is contained in:
1 parent
2d613a2de6
commit
f940d8eaad
12 files changed
+57
-1242
No files matched your search
@@ -166,20 +166,20 @@ export async function splitResource(
|
||||
while (index < files.length) {
|
||||
let total = 0;
|
||||
const start = index;
|
||||
for (let i = index; i < files.length; i++) {
|
||||
let i = index;
|
||||
for (; i < files.length; i++) {
|
||||
const file = files[i];
|
||||
if (file.exceed) {
|
||||
if (i === index) i = index + 1;
|
||||
index = i;
|
||||
break;
|
||||
} else {
|
||||
total += file.stats.size;
|
||||
}
|
||||
if (total > limit) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
index = i;
|
||||
const toZip = files.slice(start, index);
|
||||
result.push(await compressFiles(toZip));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user