« get me outta code hell

eslint, sugar: accumulateSum: fix bad nullish check - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-05-27 19:44:05 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-05-27 19:46:24 -0300
commit2c40a248570d0e42ec5ea42b0c98848a60bcbef1 (patch)
tree46381da02af91ae2cc78d3f0c8e08ac6de55cc59 /src
parent9e3198ae75943fd97ea0dacd7d4cec9bdbb6bcc8 (diff)
eslint, sugar: accumulateSum: fix bad nullish check
Diffstat (limited to 'src')
-rw-r--r--src/common-util/sugar.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common-util/sugar.js b/src/common-util/sugar.js
index 9e344816..699f1091 100644
--- a/src/common-util/sugar.js
+++ b/src/common-util/sugar.js
@@ -119,7 +119,7 @@ export function accumulateSum(array, fn = x => x) {
   return array.reduce(
     (accumulator, value, index, array) =>
       accumulator +
-        fn(value, index, array) ?? 0,
+      (fn(value, index, array) ?? 0),
     0);
 }