From 4f946f1f71b59e08c1adb9d7a409c29076391ff8 Mon Sep 17 00:00:00 2001 From: Rohan Marwaha Date: Fri, 8 Dec 2023 12:19:33 -0600 Subject: [PATCH] Fix: HandleRegenerate fix for messages not containing img description. --- src/components/Chat/Chat.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Chat/Chat.tsx b/src/components/Chat/Chat.tsx index 03d570ab8..4e9e83abe 100644 --- a/src/components/Chat/Chat.tsx +++ b/src/components/Chat/Chat.tsx @@ -568,9 +568,8 @@ export const Chat = memo(({ stopConversationRef, courseMetadata }: Props) => { // Remove the existing image description (currentMessage.content as Content[]).splice(imgDescIndex, 1); } - - handleSend(currentMessage, 2, null); } + handleSend(currentMessage as Message, 2, null); }, [currentMessage, handleSend]); const scrollToBottom = useCallback(() => {