diff --git a/components/ai_chat/resources/page/hooks/useIsConversationVisible.ts b/components/ai_chat/resources/page/hooks/useIsConversationVisible.ts index 08003eb936d4..9cfd46fbaa2c 100644 --- a/components/ai_chat/resources/page/hooks/useIsConversationVisible.ts +++ b/components/ai_chat/resources/page/hooks/useIsConversationVisible.ts @@ -9,5 +9,8 @@ import { useAIChat } from "../state/ai_chat_context"; export default function useIsConversationVisible(conversationId?: string) { const context = useAIChat() - return !!useMemo(() => context.visibleConversations.find(c => c.uuid === conversationId), [conversationId, context.visibleConversations]) + return useMemo( + () => context.visibleConversations.some(c => c.uuid === conversationId), + [conversationId, context.visibleConversations] + ) }