From 5763ea58bde0ed442a97b2a0a9701ffeb4a3356c Mon Sep 17 00:00:00 2001 From: sunjie Date: Fri, 1 Aug 2025 14:14:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=20js=20reduce=20=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=80=BC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_salary/static/src/views/list/list_renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yuthon_salary/static/src/views/list/list_renderer.js b/yuthon_salary/static/src/views/list/list_renderer.js index b70e3a67b..535efaf46 100644 --- a/yuthon_salary/static/src/views/list/list_renderer.js +++ b/yuthon_salary/static/src/views/list/list_renderer.js @@ -127,7 +127,7 @@ patch(ListRenderer.prototype, { } if (["float", "int", "monetary"].includes(fieldInfo.type)) { const fieldValues = values.map((v) => v[fieldInfo.name] || 0); - const aggregateValue = fieldValues.reduce((acc, val) => acc + val); + const aggregateValue = fieldValues.reduce((acc, val) => acc + val, 0); if (!aggregateValue) { console.log(column) return false;