From 2d8cf02296ec42c4466beef1c54c97c44779ec1a Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Fri, 9 Feb 2024 17:19:58 +0100 Subject: [PATCH] Add nullsafe to footprint mean gather --- web/frontend/src/JobFootprint.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/frontend/src/JobFootprint.svelte b/web/frontend/src/JobFootprint.svelte index e4839afb..e860e04c 100644 --- a/web/frontend/src/JobFootprint.svelte +++ b/web/frontend/src/JobFootprint.svelte @@ -43,8 +43,10 @@ } else if (jm?.metric?.series?.length > 1) { const avgs = jm.metric.series.map(jms => jms.statistics.avg) mv = round(mean(avgs), 2) - } else { + } else if (jm?.metric?.series) { mv = round(jm.metric.series[0].statistics.avg, 2) + } else { + mv = 0.0 } }