From 52b0759e009e7f7630773731cf282d28597620e3 Mon Sep 17 00:00:00 2001 From: Nils Gereke Date: Sat, 9 Sep 2023 04:41:28 +0000 Subject: [PATCH] fix: total servers only representing last node --- src/widgets/pterodactyl/component.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/pterodactyl/component.jsx b/src/widgets/pterodactyl/component.jsx index 83ace637..e67d6f8c 100644 --- a/src/widgets/pterodactyl/component.jsx +++ b/src/widgets/pterodactyl/component.jsx @@ -23,7 +23,7 @@ export default function Component({ service }) { } const totalServers = nodesData.data.reduce((total, node) => - node.attributes?.relationships?.servers?.data?.length ?? 0 + total, 0); + (node.attributes?.relationships?.servers?.data?.length ?? 0) + total, 0); return (