From d12b0d5a53689183a852c98ad716c225d5817643 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 27 Sep 2024 01:00:25 -0700 Subject: [PATCH] Fix: correct caculations for mailcow widget (#4055) --- src/widgets/mailcow/component.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widgets/mailcow/component.jsx b/src/widgets/mailcow/component.jsx index 3587eabfb..5d5fee9da 100644 --- a/src/widgets/mailcow/component.jsx +++ b/src/widgets/mailcow/component.jsx @@ -25,9 +25,9 @@ export default function Component({ service }) { } const domains = resultData.length; - const mailboxes = resultData.reduce((acc, val) => acc + val.mboxes_in_domain, 0); - const mails = resultData.reduce((acc, val) => acc + val.msgs_total, 0); - const storage = resultData.reduce((acc, val) => acc + val.bytes_total, 0); + const mailboxes = resultData.reduce((acc, val) => acc + parseInt(val.mboxes_in_domain, 10), 0); + const mails = resultData.reduce((acc, val) => acc + parseInt(val.msgs_total, 10), 0); + const storage = resultData.reduce((acc, val) => acc + parseInt(val.bytes_total, 10), 0); return (