From 615d549494b42e25304392b113f46b3cfc7ba6b1 Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Wed, 7 Feb 2024 05:09:12 +0530 Subject: [PATCH] slight fixes, checking for null case --- frontend/src/conversation/Conversation.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index 12ebba66..6813ed0f 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -41,10 +41,9 @@ export default function Conversation() { useEffect(() => { return () => { - fetchStream.current.abort(); //abort previous stream + fetchStream.current && fetchStream.current.abort(); //abort previous stream } }, [conversationId]) - useEffect(() => { const observerCallback: IntersectionObserverCallback = (entries) => { entries.forEach((entry) => {