Browse Source

refactor(nocodb): adopt getList new format in Plugin.ts

pull/5430/head
Wing-Kam Wong 2 years ago
parent
commit
472f02ba15
  1. 6
      packages/nocodb/src/lib/models/Plugin.ts

6
packages/nocodb/src/lib/models/Plugin.ts

@ -43,8 +43,10 @@ export default class Plugin implements PluginType {
}
static async list(ncMeta = Noco.ncMeta) {
let pluginList = await NocoCache.getList(CacheScope.PLUGIN, []);
if (!pluginList.length) {
const cachedList = await NocoCache.getList(CacheScope.PLUGIN, []);
let { list: pluginList } = cachedList;
const { isEmptyList } = cachedList;
if (!isEmptyList && !pluginList.length) {
pluginList = await ncMeta.metaList2(null, null, MetaTable.PLUGIN);
await NocoCache.setList(CacheScope.PLUGIN, [], pluginList);
}

Loading…
Cancel
Save