Skip to content

Commit f8a04a2

Browse files
committed
address comment.
1 parent 7b74d42 commit f8a04a2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/lib/components/multiSelectTable.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@
9393
const deleted: string[] = [];
9494
let firstError: Error | undefined;
9595
96+
// prevent infinite loop
97+
if (batchSize !== undefined) {
98+
batchSize = Math.max(1, Math.floor(Math.abs(batchSize)));
99+
}
100+
96101
async function processBatch(batch: string[]) {
97102
// build promises
98103
const results = await Promise.allSettled(batch.map((id) => deleteFn(id)));

0 commit comments

Comments
 (0)