From 22988d5cb46533c9703e814602fb91b748173bbd Mon Sep 17 00:00:00 2001 From: Shigma <1700011071@pku.edu.cn> Date: Sun, 4 Apr 2021 00:29:22 +0800 Subject: [PATCH] fix(webui): fix hour chart error --- packages/plugin-webui/client/views/home/hour-chart.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-webui/client/views/home/hour-chart.vue b/packages/plugin-webui/client/views/home/hour-chart.vue index aa339dd006..4001227088 100644 --- a/packages/plugin-webui/client/views/home/hour-chart.vue +++ b/packages/plugin-webui/client/views/home/hour-chart.vue @@ -22,7 +22,7 @@ const option = computed(() => ({ const source = stats.value.hours[dataIndex] const output = [ `${formatHour(x)}`, - `消息总量:${+source.total.toFixed(1)}`, + `消息总量:${+(source.total || 0).toFixed(1)}`, ] params.reverse().forEach(({ seriesName, color, data: [x, y], marker }, index) => { const value = index === 0 ? source.command