From 07bb7f8ba9a595c1c76ece85d1a2fb87b4d419a2 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 12 Sep 2025 16:34:40 +0800 Subject: [PATCH] fix: enhance node metrics handling by checking state before accessing metrics map --- frontend/crawlab-ui/src/views/node/list/useNodeList.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/crawlab-ui/src/views/node/list/useNodeList.tsx b/frontend/crawlab-ui/src/views/node/list/useNodeList.tsx index 128d6130..321bd400 100644 --- a/frontend/crawlab-ui/src/views/node/list/useNodeList.tsx +++ b/frontend/crawlab-ui/src/views/node/list/useNodeList.tsx @@ -303,7 +303,7 @@ const useNodeList = () => { icon: ['fa', 'chart-line'], width: '240', value: (row: Node) => { - if (!row._id) return; + if (!row._id || !state.nodeMetricsMap) return; const currentMetrics = state.nodeMetricsMap[row._id]; return ( { const opts = getDefaultUseListOptions(navActions, tableColumns); // init - setupListComponent(ns, store, []); + setupListComponent(ns, store, true); if (isPro()) { onBeforeMount(() => store.dispatch(`${ns}/getNodeMetrics`));