diff --git a/front/lib/api/tables.ts b/front/lib/api/tables.ts index 043c687b5c4f..bb64a7c671e5 100644 --- a/front/lib/api/tables.ts +++ b/front/lib/api/tables.ts @@ -373,11 +373,10 @@ export async function rowsFromCsv({ const valuesByCol: Record = Object.create(null); for await (const anyRecord of parser) { if (i++ >= rowIndex) { - const record = anyRecord as string[]; for (const [i, h] of header.entries()) { try { valuesByCol[h] ??= []; - (valuesByCol[h] as string[]).push(record[i] ?? ""); + valuesByCol[h].push((anyRecord[i] ?? "").toString()); } catch (e) { logger.error( // temporary log to fix the valuesByCol[h].push is not a function error