Add nullsafe to footprint mean gather

This commit is contained in:
Christoph Kluge 2024-02-09 17:19:58 +01:00
parent 71386f8466
commit 2d8cf02296

View File

@ -43,8 +43,10 @@
} else if (jm?.metric?.series?.length > 1) { } else if (jm?.metric?.series?.length > 1) {
const avgs = jm.metric.series.map(jms => jms.statistics.avg) const avgs = jm.metric.series.map(jms => jms.statistics.avg)
mv = round(mean(avgs), 2) mv = round(mean(avgs), 2)
} else { } else if (jm?.metric?.series) {
mv = round(jm.metric.series[0].statistics.avg, 2) mv = round(jm.metric.series[0].statistics.avg, 2)
} else {
mv = 0.0
} }
} }