diff --git a/src/lib/apis/chats/index.ts b/src/lib/apis/chats/index.ts index 991574436..6b59cda20 100644 --- a/src/lib/apis/chats/index.ts +++ b/src/lib/apis/chats/index.ts @@ -142,6 +142,10 @@ export const getChatList = async ( throw error; } + if (!res) { + return []; + } + return res.map((chat) => ({ ...chat, time_range: getTimeRange(chat.updated_at)