Skip to content

Commit 6d2c60c

Browse files
Merge pull request #534 from krinish291/master
Fixed: restrict empty message
2 parents 5a2d0e8 + 3c1ee50 commit 6d2c60c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/contexts/messageInputContext/MessageInputContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ export const MessageInputProvider = <
469469

470470
/** Checks if the message is valid or not. Accordingly we can enable/disable send button */
471471
const isValidMessage = () => {
472-
if (text) {
472+
if (text && text.trim()) {
473473
return true;
474474
}
475475

0 commit comments

Comments
 (0)