From 403874feb6ee06c007ae02fd5b3f81c51eb0a704 Mon Sep 17 00:00:00 2001 From: zyh Date: Tue, 2 Jul 2024 17:46:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dassetinfo=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=20=E6=9F=90=E4=B8=AA=E7=A3=81=E7=9B=98=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8size=20total=E8=AE=A1=E7=AE=97=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/chart/chartDetailNew.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) } } }