Skip to content

Commit

Permalink
removed unnecessary else
Browse files Browse the repository at this point in the history
  • Loading branch information
ftwpala committed Dec 15, 2024
1 parent 4b1f4cf commit c9b4995
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions assets/chat/js/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,16 +442,14 @@ class Chat {
if (!this.authenticated) {
this.loginscrn.show();
} else {
// don't do anything if the message is marked invalid client-side (currently only when the message is too long)
if (!this.input.hasClass("invalid-msg-warning")) {
this.control.emit(
"SEND",
this.input.val().toString().trim()
);
this.input.val("").trigger("input");
}
else{
// do nothing because the message is too long
}
}
this.input.focus();
}
Expand Down

0 comments on commit c9b4995

Please sign in to comment.