Skip to content

best way to save what you love

web/queue: clamp percentage between 0 and 100

jjb21e66e942fb
diff --git a/web/src/components/queue/ProcessingQueueItem.svelte b/web/src/components/queue/ProcessingQueueItem.svelte
index dcda6261..2bcf57e1 100644
--- a/web/src/components/queue/ProcessingQueueItem.svelte
+++ b/web/src/components/queue/ProcessingQueueItem.svelte
@@ -145,8 +145,8 @@
const worker = item.pipeline[workerIndex];
const task = $currentTasks[worker.workerId];
- if (task?.progress) {
- return task.progress.percentage;
+ if (task?.progress?.percentage) {
+ return Math.max(0, Math.min(100, task.progress.percentage));
}
}