diff --git a/home.html b/home.html
index d7e30c0..7c140dc 100644
--- a/home.html
+++ b/home.html
@@ -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;