From a70490648f4c5fa0f8e16509af9e56aa34cf5f4d Mon Sep 17 00:00:00 2001 From: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com> Date: Fri, 23 Feb 2024 16:53:15 +0000 Subject: [PATCH] Fix total db size calculation for inv sync (#598) --- plugins/inventory_sync/controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inventory_sync/controller.ts b/plugins/inventory_sync/controller.ts index 6ce19850..0b4051fe 100644 --- a/plugins/inventory_sync/controller.ts +++ b/plugins/inventory_sync/controller.ts @@ -190,7 +190,7 @@ export class ControllerPlugin extends BaseControllerPlugin { })) .sort((a, b) => b.length - a.length); return new msg.DatabaseStatsRequest.Response( - playerDatastore.map(x => x.length).reduce((a, b) => b - a, 0), + playerDatastore.map(x => x.length).reduce((acc, val) => acc + val, 0), playerDatastore.length, { name: playerDatastore[0] && playerDatastore[0].name || "-",