mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-24 18:42: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 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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user