check if content isn't just whitespaces (client side this time)
Signed-off-by: carsand101 <carsand101@noreply.codeberg.org>
This commit is contained in:
parent
232798fa17
commit
38e2c74f47
|
@ -72,10 +72,15 @@ async function sendMessage(content, id) {
|
|||
|
||||
messageBox.addEventListener("keyup", function onEvent(event) {
|
||||
if (event.key === "Enter") {
|
||||
if (!messageBox.value.trim().length == 0) {
|
||||
sendMessage(messageBox.value, channelID)
|
||||
updateMessages(channelID)
|
||||
messageBox.value = ""
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function update() {
|
||||
|
|
Reference in New Issue