Skip to content

Commit

Permalink
refactor: determine userInput by trimming
Browse files Browse the repository at this point in the history
  • Loading branch information
wsw2000 committed May 4, 2023
1 parent 6c1261d commit 319959a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ export function Chat() {

// submit user input
const onUserSubmit = () => {
if (userInput.length <= 0) return;
if (userInput.trim() === "") return;
setIsLoading(true);
chatStore.onUserInput(userInput).then(() => setIsLoading(false));
setBeforeInput(userInput);
Expand Down

0 comments on commit 319959a

Please sign in to comment.