From fa2fb2864fa0d0320b18bda7aa15abb5836ec105 Mon Sep 17 00:00:00 2001 From: "web@ppanel" Date: Sat, 29 Mar 2025 23:43:21 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(node):=20Handle=20potential?= =?UTF-8?q?=20null=20value=20for=20online=20users=20count?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/admin/app/dashboard/server/node-status.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/admin/app/dashboard/server/node-status.tsx b/apps/admin/app/dashboard/server/node-status.tsx index d694fd0..2d5ece4 100644 --- a/apps/admin/app/dashboard/server/node-status.tsx +++ b/apps/admin/app/dashboard/server/node-status.tsx @@ -38,7 +38,7 @@ export function NodeStatusCell({ status }: { status: API.NodeStatus }) { const isOnline = updated_at > 0; const badgeVariant = isOnline ? 'default' : 'destructive'; const badgeText = isOnline ? t('normal') : t('abnormal'); - const onlineCount = Object.keys(online).length || 0; + const onlineCount = (online && Object.keys(online).length) || 0; return (