Browse Source

fix: handle if sorts is undefined/null

pull/6941/head
Pranav C 10 months ago
parent
commit
076608d263
  1. 2
      packages/nocodb/src/db/BaseModelSqlv2.ts

2
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -667,7 +667,7 @@ class BaseModelSqlv2 {
// if sort is provided filter out the group by columns sort and apply
// since we are grouping by the column and applying sort on any other column is not required
for (const sort of sorts) {
for (const sort of sorts || []) {
if (!groupByColumns[sort.fk_column_id]) {
continue;
}

Loading…
Cancel
Save