From 2d9f03c394183aa27c1b9c954cfd41f39de0b38d Mon Sep 17 00:00:00 2001 From: Regalijan Date: Mon, 13 Apr 2026 02:46:17 -0400 Subject: [PATCH] Fix weird token element null issue --- app/routes/report.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routes/report.tsx b/app/routes/report.tsx index 4c1f782..0969bbe 100644 --- a/app/routes/report.tsx +++ b/app/routes/report.tsx @@ -112,9 +112,9 @@ export default function () { if (!logged_in) { const tokenElem = document .getElementsByName("cf-turnstile-response") - .item(0) as HTMLInputElement; + .item(0) as HTMLInputElement | null; - if (!tokenElem.value) { + if (!tokenElem?.value) { setLoading(false); return toast({ description: "Please complete the captcha and try again",