Browse Source

fix: handle null case

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5936/head
Pranav C 1 year ago
parent
commit
c21c38bdbd
  1. 2
      packages/nocodb/src/models/Model.ts

2
packages/nocodb/src/models/Model.ts

@ -293,9 +293,9 @@ export default class Model implements TableType {
));
if (!modelData) {
modelData = await ncMeta.metaGet2(null, null, MetaTable.MODELS, k);
modelData.meta = parseMetaProp(modelData);
}
if (modelData) {
modelData.meta = parseMetaProp(modelData);
await NocoCache.set(`${CacheScope.MODEL}:${modelData.id}`, modelData);
return new Model(modelData);
}

Loading…
Cancel
Save