Fix #70, name change on cancel

Don't send the /nick command if a user clicks on the "nick" button and
cancels out of the prompt.
This commit is contained in:
Zorchenhimer 2019-03-28 15:19:43 -04:00
parent b03329772e
commit 64a6b2943c

View File

@ -124,7 +124,7 @@ function auth() {
function nick() {
let nick = prompt("Enter new name");
if (nick != "") {
if (nick != "" && nick !== null) {
sendMessage("/nick " + nick);
}
}
@ -270,4 +270,4 @@ function pleaseremovethis() {
"tomato", "turquoise", "violet", "wheat", "white",
"whitesmoke", "yellow", "yellowgreen",]
}
}