From 46f3668f8ed53c82191cb1b9e5eea844bf4789e0 Mon Sep 17 00:00:00 2001 From: zhangjingwei Date: Thu, 28 Mar 2024 10:41:57 +0800 Subject: [PATCH] fix: physical node page display error Fix display error when node information cannot be obtained Change-Id: Ife201c5f04766f1a304b1bb1b562e643ad5ed0cb --- .../PrometheusChart/component/hooks/useNodeSelect.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/PrometheusChart/component/hooks/useNodeSelect.jsx b/src/components/PrometheusChart/component/hooks/useNodeSelect.jsx index 4e4d8df9..068c557e 100644 --- a/src/components/PrometheusChart/component/hooks/useNodeSelect.jsx +++ b/src/components/PrometheusChart/component/hooks/useNodeSelect.jsx @@ -14,6 +14,9 @@ const useNodeSelect = (defaultNode) => { }; const Nodes = () => { + if (!nodes.length) { + return null; + } const key = getKey(); return (