From e95e084956959b4828eb390a9d5a29e1580c9dbb Mon Sep 17 00:00:00 2001 From: Arnab Ghosh Date: Wed, 4 Oct 2023 20:54:25 +0530 Subject: [PATCH] Fixed Empty Spaces Passed in the Input Field --- frontend/src/conversation/Conversation.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index b110ec19..c7910818 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -61,6 +61,8 @@ export default function Conversation() { }; const handleQuestion = (question: string) => { + question = question.trim(); + if (question === '') return; dispatch(addQuery({ prompt: question })); dispatch(fetchAnswer({ question })); };