From 997bf0bd54bb56ae256e0c8f20586b7a80bd7e51 Mon Sep 17 00:00:00 2001 From: Regalijan Date: Sat, 2 Mar 2024 03:02:53 -0500 Subject: [PATCH] Actually fix it this time --- app/routes/et-members.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/routes/et-members.tsx b/app/routes/et-members.tsx index 278e8f6..c4dd06e 100644 --- a/app/routes/et-members.tsx +++ b/app/routes/et-members.tsx @@ -292,9 +292,7 @@ export default function () { { - const { - data, - }: { data?: string } & FormEvent = e; + const data = (e.target as HTMLInputElement).value as string; if (!data) return; @@ -302,7 +300,7 @@ export default function () { data.match(/\W/) || data.length > 20 || // Need Number pseudo-constructor since matches might be null - Number(data.match(/_/g)?.length) > 1 || + (data.match(/_/g)?.length || 0) > 1 || data.startsWith("_") ) e.preventDefault();