Browse Source

fix: provide initial value in reduce method

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5901/head
Pranav C 1 year ago
parent
commit
220dc863e5
  1. 2
      packages/nocodb/src/services/data-table.service.ts

2
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];

Loading…
Cancel
Save