fix runschart handling of empty started at

This commit is contained in:
Ruben Fiszel
2025-03-12 17:18:45 +01:00
parent 4aaf9e1848
commit 906bfef1bd

View File

@@ -176,8 +176,11 @@
function minJobTime(jobs: CompletedJob[]): Date {
let min: Date = new Date(jobs[0].started_at)
for (const job of jobs) {
if (new Date(job.started_at) < min) {
min = new Date(job.started_at)
if (job.started_at != undefined) {
const date = new Date(job.started_at)
if (date < min) {
min = date
}
}
}
return min