From b21e66e942fbf71d0fb9f77b128fbe2967249ced Mon Sep 17 00:00:00 2001 From: jj Date: Fri, 23 May 2025 15:57:08 +0000 Subject: [PATCH] web/queue: clamp percentage between 0 and 100 --- web/src/components/queue/ProcessingQueueItem.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); } }