Browse Source

fix: handle null case

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

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

@ -127,9 +127,11 @@ export default class View implements ViewType {
)); ));
if (!view) { if (!view) {
view = await ncMeta.metaGet2(null, null, MetaTable.VIEWS, viewId); view = await ncMeta.metaGet2(null, null, MetaTable.VIEWS, viewId);
if (view) {
view.meta = parseMetaProp(view); view.meta = parseMetaProp(view);
await NocoCache.set(`${CacheScope.VIEW}:${view.id}`, view); await NocoCache.set(`${CacheScope.VIEW}:${view.id}`, view);
} }
}
return view && new View(view); return view && new View(view);
} }

Loading…
Cancel
Save