From 220dc863e5ac308d1cacc6805f7f7887bed1443c Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 30 May 2023 13:14:58 +0530 Subject: [PATCH] fix: provide initial value in reduce method Signed-off-by: Pranav C --- packages/nocodb/src/services/data-table.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nocodb/src/services/data-table.service.ts b/packages/nocodb/src/services/data-table.service.ts index 020d3fa77f..9251af6004 100644 --- a/packages/nocodb/src/services/data-table.service.ts +++ b/packages/nocodb/src/services/data-table.service.ts @@ -192,7 +192,7 @@ export class DataTableService { return pkColumns.reduce((acc, col) => { acc[col.title] = row[col.title]; return acc; - }); + }, {}); }); return Array.isArray(body) ? result : result[0];