no blank messages

This commit is contained in:
maaa 2023-07-12 01:03:03 +02:00
parent b67a441e0c
commit 0d5a1028ae
1 changed files with 2 additions and 0 deletions

View File

@ -72,9 +72,11 @@ async function sendMessage(content, id) {
messageBox.addEventListener("keyup", function onEvent(event) {
if (event.key === "Enter") {
if (!messageBox.value == "") {
sendMessage(messageBox.value, channelID)
updateMessages(channelID)
messageBox.value = ""
}
}
})