fix: unfinished chat load error

This commit is contained in:
Timothy J. Baek 2023-10-28 20:18:48 -07:00
parent edac6f4dbd
commit ce4973becb

View file

@ -236,6 +236,9 @@
const loadChat = async (id) => { const loadChat = async (id) => {
const chat = await db.get('chats', id); const chat = await db.get('chats', id);
if (chatId !== chat.id) { if (chatId !== chat.id) {
if (chat.messages.length > 0) {
chat.messages.at(-1).done = true;
}
messages = chat.messages; messages = chat.messages;
title = chat.title; title = chat.title;
chatId = chat.id; chatId = chat.id;