🐛 fix(node): Handle potential null value for online users count
This commit is contained in:
parent
8d49daca21
commit
fa2fb2864f
@ -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 (
|
||||
<TooltipProvider>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user