Skip to content

An AI-powered search engine with a generative UI

fix history: chat maybe undefined

Baorong Li1568c7ad36a4
diff --git a/components/history.tsx b/components/history.tsx
index f8654772..61650471 100644
--- a/components/history.tsx
+++ b/components/history.tsx
@@ -47,7 +47,7 @@ export function History({ location, chats }: HistoryProps) {
</div>
) : (
chats?.map((chat: Chat) => (
- <HistoryItem key={chat.id} chat={chat} />
+ chat && <HistoryItem key={chat.id} chat={chat} />
))
)}
</div>