web/queue: clamp percentage between 0 and 100

This commit is contained in:
jj 2025-05-23 15:57:08 +00:00
parent c647e191f3
commit b21e66e942
No known key found for this signature in database

View File

@ -145,8 +145,8 @@
const worker = item.pipeline[workerIndex]; const worker = item.pipeline[workerIndex];
const task = $currentTasks[worker.workerId]; const task = $currentTasks[worker.workerId];
if (task?.progress) { if (task?.progress?.percentage) {
return task.progress.percentage; return Math.max(0, Math.min(100, task.progress.percentage));
} }
} }