Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: handle missing order column when retrieving AST

DarkPhoenix27045b2dd5734e3b
diff --git a/packages/nocodb/src/helpers/getAst.ts b/packages/nocodb/src/helpers/getAst.ts
index f6c86be61e..3ea8afcfa8 100644
--- a/packages/nocodb/src/helpers/getAst.ts
+++ b/packages/nocodb/src/helpers/getAst.ts
@@ -127,7 +127,9 @@ const getAst = async (
if (includeSortAndFilterColumns) {
const orderCol = model.columns.find((c) => isOrderCol(c));
- sortColumnIds.push(orderCol.id);
+ if (orderCol) {
+ sortColumnIds.push(orderCol.id);
+ }
}
const rowColoringColumnIds = new Set<string>();