From 4f1cde97eceaec69cb6d07299d73e0b96f4fe300 Mon Sep 17 00:00:00 2001 From: Nils Gereke Date: Sat, 9 Sep 2023 13:04:41 +0000 Subject: [PATCH] fix: total servers only representing last node (#1936) --- 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 83ace637c..e67d6f8c4 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 (