convert user-entered join code to lowercase

This commit is contained in:
Maier
2019-09-09 14:00:17 -04:00
parent 1f2785cd1e
commit 40c22f769f

View File

@@ -17,12 +17,12 @@ socket.on('success', function() {
if (sessionStorage.getItem("host")) {
sessionStorage.removeItem("host");
}
window.location.replace('/' + document.getElementById("code").value.toString().trim());
window.location.replace('/' + document.getElementById("code").value.toString().trim().toLowerCase());
});
document.getElementById("join-btn").addEventListener("click", function() {
if (document.getElementById("name").value.length > 0) {
const code = document.getElementById("code").value.toString().trim();
const code = document.getElementById("code").value.toString().trim().toLowerCase();
if (document.getElementById("name").classList.contains("error")) {
document.getElementById("name").classList.remove("error");
document.getElementById("name-error").innerText = "";