From 48cf50307d6350288846edc536e841854fcbdcd1 Mon Sep 17 00:00:00 2001 From: weibaohui Date: Sun, 12 Nov 2023 20:45:25 +0800 Subject: [PATCH] fix npe --- src/frontend/components/ResCountLineView.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend/components/ResCountLineView.vue b/src/frontend/components/ResCountLineView.vue index 353d2b6..6e2b26c 100644 --- a/src/frontend/components/ResCountLineView.vue +++ b/src/frontend/components/ResCountLineView.vue @@ -15,7 +15,8 @@ onMounted(async () => { counterLines.value = await K8sService.playService.counterControllerListAllCounterLine() workloadCounterLines.value = {} wks.forEach((k) => { - workloadCounterLines.value[k] = counterLines.value[k].toString().split(',') + if (counterLines.value[k]) + workloadCounterLines.value[k] = counterLines.value[k].toString().split(',') }) }) })