From 4aea4313f7c475d5b85775f49fdf555ac05594af Mon Sep 17 00:00:00 2001
From: vincenttrinh3336 <158768889+vincenttrinh3336@users.noreply.github.com>
Date: Wed, 1 May 2024 03:48:22 +0000
Subject: [PATCH] fixed name length defect
---
html/index.html | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/html/index.html b/html/index.html
index c1cdd25..b71ebe0 100644
--- a/html/index.html
+++ b/html/index.html
@@ -591,8 +591,9 @@
List of valid Words
function join()
{
username = document.getElementById("username").value;
+ var usernameVar = username;
console.log("This is the username length");
- console.log(username.length());
+ console.log(usernameVar.length());
if (username.trim() !== "")
{
@@ -639,7 +640,7 @@ List of valid Words
}
- else if(username.length() > 10)
+ else if(usernameVar.length() > 10)
{
alert("Username is too long. Names have to be 10 or less characters");
sent_status = 0;