Skip to content

Commit

Permalink
Add nullsafe to footprint mean gather
Browse files Browse the repository at this point in the history
  • Loading branch information
spacehamster87 committed Feb 9, 2024
1 parent 71386f8 commit 2d8cf02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/frontend/src/JobFootprint.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 2d8cf02

Please sign in to comment.