From 2c40a248570d0e42ec5ea42b0c98848a60bcbef1 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 27 May 2025 19:44:05 -0300 Subject: eslint, sugar: accumulateSum: fix bad nullish check --- src/common-util/sugar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); } -- cgit 1.3.0-6-gf8a5