From 906bfef1bd56b6987020c4c3cfa2fabba3bfc3d1 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 12 Mar 2025 17:18:45 +0100 Subject: [PATCH] fix runschart handling of empty started at --- frontend/src/lib/components/RunChart.svelte | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/RunChart.svelte b/frontend/src/lib/components/RunChart.svelte index e976fd3351..9d1dbc16d1 100644 --- a/frontend/src/lib/components/RunChart.svelte +++ b/frontend/src/lib/components/RunChart.svelte @@ -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