mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-24 10:32:09 +02:00
web/queue: clamp percentage between 0 and 100
This commit is contained in:
parent
c647e191f3
commit
b21e66e942
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user