refactor: determine userInput by trimming

This commit is contained in:
wsw 2023-05-04 22:53:22 +08:00
parent 6c1261d28d
commit 319959ad6e
1 changed files with 1 additions and 1 deletions

View File

@ -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);