diff --git a/nezha-fronted/src/components/chart/chartDetailNew.vue b/nezha-fronted/src/components/chart/chartDetailNew.vue index d34ed99fe..7e92580a6 100644 --- a/nezha-fronted/src/components/chart/chartDetailNew.vue +++ b/nezha-fronted/src/components/chart/chartDetailNew.vue @@ -188,7 +188,7 @@ export default { methods: { bytes: chartDataFormat.getUnit(7).compute, calcTotal (arr, key) { - return arr.reduce((acc, curr) => acc + Number(curr[key]), 0) + return arr.reduce((acc, curr) => acc + (Number(curr[key] || 0)), 0) } } }