From c8755e461c7a072fbbba95f633f405c33247905a Mon Sep 17 00:00:00 2001 From: chenruilong Date: Wed, 12 Jun 2024 15:27:26 +0800 Subject: [PATCH] update: uni-cms-articles.schema.ext.js --- collection/uni-cms-articles/schema.ext.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collection/uni-cms-articles/schema.ext.js b/collection/uni-cms-articles/schema.ext.js index 64fe744..b6b7e1c 100644 --- a/collection/uni-cms-articles/schema.ext.js +++ b/collection/uni-cms-articles/schema.ext.js @@ -176,7 +176,7 @@ module.exports = { afterRead: async function ({userInfo, clientInfo, result, where, field}) { const isAdmin = field && field.length && field.includes('is_admin') // 检查是否配置了clientAppIds字段,如果没有则抛出错误 - if (!config.clientAppIds && !config.clientAppIds.length && !isAdmin) { + if ((!config.clientAppIds || !config.clientAppIds.length) && !isAdmin) { throw new Error('请在 uni-cms 配置文件中配置 clientAppIds 字段后访问,详见:https://uniapp.dcloud.net.cn/uniCloud/uni-cms.html#uni-cms-config') }