diff --git a/static/js/chat.js b/static/js/chat.js index a2eccdb..97ff2af 100644 --- a/static/js/chat.js +++ b/static/js/chat.js @@ -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 = "" + } } })