diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index 1ac6d24d..551c6ac6 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -54,13 +54,9 @@ export default function Conversation() { } }, []); - useEffect(() => { - return () => { - if (status !== 'idle') { - fetchStream.current && fetchStream.current.abort(); //abort previous stream - } - }; - }, [status]); + useEffect(()=>{ + fetchStream.current && fetchStream.current.abort(); + },[conversationId]); useEffect(() => { const observerCallback: IntersectionObserverCallback = (entries) => {