Commit 19f15b59 by 杨铁龙

fix:发送消息控制台报错

parent 360546b1
Showing with 5 additions and 3 deletions
......@@ -40,7 +40,10 @@ function filterMessages(
const removeRegisterChatEvents: (() => void)[] = [];
async function preCacheImgs(msgs: any[]) {
async function preCacheImgs(msgs?: any[]) {
if (!msgs) {
return Promise.resolve();
}
await Promise.all(
msgs.map((k) => {
return new Promise((resolve: (p: void) => void) => {
......@@ -320,11 +323,10 @@ export default {
async [ChatStore.ACTION_GET_MY_CHAT_LIST]({
state,
commit,
}) /* ...params: Parameters<ChatStore.ACTION_GET_MY_CHAT_LIST> */ {
}) {
const data = await xim.fetchChatList();
if (data == null) return;
const chatList = data.args[0];
console.log("chatList:", chatList);
commit(ChatStore.MUTATION_SAVE_CHAT_LIST, {
list: chatList.map((chat: any) => {
let business_data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment