diff --git a/src/stores/chats.ts b/src/stores/chats.ts index 7fa9a8a..dd4ad55 100644 --- a/src/stores/chats.ts +++ b/src/stores/chats.ts @@ -18,11 +18,7 @@ export const useChatsStore = defineStore('chats', () => { const selected = ref([]) const selectedChat = computed(() => { - const chatId = selected.value[0] - - return chats.value.find((chat: Chat) => { - return chat.id === chatId - }) + return chats.value.find((chat: Chat) => chat.id === selected.value[0]) }) function getChatInfo(chat: Chat) {