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",