Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
khaitruong922 committed Sep 19, 2024
1 parent df362bf commit 5defa60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ const BATCH_SIZE = 1000;
const insertResultInBatch = async () => {
inserting = true;
for (let i = 0; i < items.length; i += BATCH_SIZE) {
progress.value = Math.min(i + BATCH_SIZE, items.length);
if (interrupted) {
inserting = false;
interrupted = false;
return;
}
progress.value = Math.min(i + BATCH_SIZE, items.length);
const chunk = items.slice(i, i + BATCH_SIZE);
for (const [term, kanjiList, reading, freq] of chunk) {
const div = createText(term, reading, freq);
Expand Down

0 comments on commit 5defa60

Please sign in to comment.