From 4bd05d4a96a88d89b18ec4117eb007a5245af5c9 Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Wed, 4 Dec 2024 15:47:57 +0100 Subject: [PATCH] fix: stats download broken since commit 38195008 --- app/scripts/components/statistics.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/scripts/components/statistics.js b/app/scripts/components/statistics.js index 14e25538..5547339e 100644 --- a/app/scripts/components/statistics.js +++ b/app/scripts/components/statistics.js @@ -549,13 +549,9 @@ angular.module("korpApp").component("statistics", { let output = [] for (var row of $ctrl.data) { - let outputRow = $ctrl.searchParams.reduceVals.map((reduceVal) => { - if (row.rowId === 0) { - return "Σ" - } else { - return row[reduceVal].join(",") - } - }) + let outputRow = $ctrl.searchParams.reduceVals.map((reduceVal) => + row.rowId === 0 ? "Σ" : row.statsValues.flatMap((type) => type[reduceVal][0]) + ) outputRow.push(fmt(row.total[selVal])) for (let corp of $ctrl.searchParams.corpora) { val = row.count[corp][selVal]