From bf3c3d22a4617c1eeb00b0aa8f44fe8eb7d2b445 Mon Sep 17 00:00:00 2001 From: mertmit Date: Sat, 30 Sep 2023 17:01:45 +0000 Subject: [PATCH] fix: small fix for base order --- packages/nocodb/src/models/Base.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);