Fix variable name mistake couldn't join

This commit is contained in:
0880
2026-01-21 02:12:39 +03:30
parent 6ee7a435e0
commit 694ccc14a4

View File

@@ -154,7 +154,7 @@
const code = document.getElementById("code");
const pat = new RegExp("^[a-z0-9]{4}$")
document.getElementById("join").addEventListener("click", () => {
if (!reg.test(code.value)) {
if (!pat.test(code.value)) {
alert("Invalid ID");
} else {
window.location.href = window.location.origin + "/" + code.value;