wkw 4 hari lalu
induk
melakukan
66b27ce6b6
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      src/views/im/index.vue

+ 2 - 2
src/views/im/index.vue

@@ -96,10 +96,10 @@ const notice = ref(false)
 
 const getuserList = async () => {
   const res = await userList({uuid:walletStore.account});
-  list.value = res.data.map(item => {
+  list.value = res.data?.map(item => {
     item.avatar = item.avatar ? IM_PATH + item.avatar : item.avatar
     return item
-  });
+  }) || [];
 }
 
 const goToChat = (item) => {