diff --git a/im-uniapp/store/chatStore.js b/im-uniapp/store/chatStore.js index 8ffd431..c0d5dc3 100644 --- a/im-uniapp/store/chatStore.js +++ b/im-uniapp/store/chatStore.js @@ -513,10 +513,6 @@ export default defineStore('chatStore', { if (msgInfo.tmpId == chat.messages[idx].tmpId) { return chat.messages[idx]; } - // 如果id比要查询的消息小,说明没有这条消息 - if (msgInfo.tmpId > chat.messages[idx].tmpId) { - break; - } } } return null; diff --git a/im-web/src/store/chatStore.js b/im-web/src/store/chatStore.js index 96e1dbf..5bf096f 100644 --- a/im-web/src/store/chatStore.js +++ b/im-web/src/store/chatStore.js @@ -538,10 +538,6 @@ export default defineStore('chatStore', { if (msgInfo.tmpId == chat.messages[idx].tmpId) { return chat.messages[idx]; } - // 如果id比要查询的消息小,说明没有这条消息 - if (msgInfo.tmpId > chat.messages[idx].tmpId) { - break; - } } } }