diff --git a/packages/nocodb/src/models/Base.ts b/packages/nocodb/src/models/Base.ts index 0b49fd6cd4..bfc7a3569c 100644 --- a/packages/nocodb/src/models/Base.ts +++ b/packages/nocodb/src/models/Base.ts @@ -193,7 +193,9 @@ export default class Base implements BaseType { await NocoCache.setList(CacheScope.BASE, [args.projectId], baseDataList); } - baseDataList.sort((a, b) => (a.order ?? Infinity) - (b.order ?? Infinity)); + baseDataList.sort( + (a, b) => (a?.order ?? Infinity) - (b?.order ?? Infinity), + ); return baseDataList?.map((baseData) => { return this.castType(baseData);