diff --git a/packages/nocodb/src/cache/RedisCacheMgr.ts b/packages/nocodb/src/cache/RedisCacheMgr.ts index e0dafae4a1..7fc39c554d 100644 --- a/packages/nocodb/src/cache/RedisCacheMgr.ts +++ b/packages/nocodb/src/cache/RedisCacheMgr.ts @@ -135,7 +135,7 @@ export default class RedisCacheMgr extends CacheMgr { // e.g. arr = ["nc:::", "nc:::"] const arr = (await this.get(key, CacheGetType.TYPE_ARRAY)) || []; log(`RedisCacheMgr::getList: getting list with key ${key}`); - const isNoneList = arr.length && arr[0] === 'NONE'; + const isNoneList = arr.length && arr.includes('NONE'); if (isNoneList) { return Promise.resolve({ @@ -248,7 +248,7 @@ export default class RedisCacheMgr extends CacheMgr { : `${this.prefix}:${scope}:${subListKeys.join(':')}:list`; log(`RedisCacheMgr::appendToList: append key ${key} to ${listKey}`); let list = (await this.get(listKey, CacheGetType.TYPE_ARRAY)) || []; - if (list.length && list[0] === 'NONE') { + if (list.length && list.includes('NONE')) { list = []; await this.del(listKey); }