diff --git a/sdk/ext/CloudData.class.js b/sdk/ext/CloudData.class.js index b2c9703ddebc663756df1f61f190ebe98474bdb1..363a5beb285cd76fa86841c25ff5f73916d6f26a 100644 --- a/sdk/ext/CloudData.class.js +++ b/sdk/ext/CloudData.class.js @@ -193,6 +193,7 @@ export default class CloudData { return param == undefined ? datas : datas[0] } set(data){ + if(!data) return // 先判断是否存在 let item = this.find(data.id || data._id || Object.keys(data)[0]) if(item){ diff --git a/sdk/state/ConversationItem.class.js b/sdk/state/ConversationItem.class.js index fba687569699502bf4aeb0353c2bd2158f3ab6af..782c5da428cb14fbac3a4b5348a1660eab72e62e 100644 --- a/sdk/state/ConversationItem.class.js +++ b/sdk/state/ConversationItem.class.js @@ -39,8 +39,8 @@ class ConversationItem { // 群聊 this.group = $state.group.find(this.group_id) if (!this.group) { - console.error('群聊本地不存在 this.group_id', this.group_id); - // throw new Error('群聊不存在') + console.error('群聊不存在', this) + throw new Error('群聊不存在') } // 2. 设置群tag