Combine if statements to reduce nesting
This commit is contained in:
parent
3244ec91e8
commit
960a6d42e1
@ -187,12 +187,10 @@ $(function() {
|
||||
if (text.indexOf("/") === 0) {
|
||||
const args = text.substr(1).split(" ");
|
||||
const cmd = args.shift().toLowerCase();
|
||||
if (typeof utils.inputCommands[cmd] === "function") {
|
||||
if (utils.inputCommands[cmd](args)) {
|
||||
if (typeof utils.inputCommands[cmd] === "function" && utils.inputCommands[cmd](args)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
socket.emit("input", {
|
||||
target: chat.data("id"),
|
||||
|
Loading…
Reference in New Issue
Block a user