trim whitespace before sending message
This commit is contained in:
parent
f4d499b5b8
commit
b52a35a734
1 changed files with 2 additions and 2 deletions
|
@ -98,9 +98,9 @@
|
||||||
|
|
||||||
const sendMessage = async () => {
|
const sendMessage = async () => {
|
||||||
messageTextarea.focus();
|
messageTextarea.focus();
|
||||||
const content = messageInput;
|
const content = messageInput.trim();
|
||||||
|
|
||||||
if (content.trim() === "" || !userInfoStore.value)
|
if (!content.length || !userInfoStore.value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// optimistically add message to store
|
// optimistically add message to store
|
||||||
|
|
Loading…
Reference in a new issue