Fix weird token element null issue
All checks were successful
Test, Build, Deploy / Test, Build, and Deploy (push) Successful in 1m0s
Test, Build, Deploy / Create Sentry Release (push) Successful in 6s

This commit is contained in:
2026-04-13 02:46:17 -04:00
parent c51b29ce57
commit 2d9f03c394

View File

@@ -112,9 +112,9 @@ export default function () {
if (!logged_in) { if (!logged_in) {
const tokenElem = document const tokenElem = document
.getElementsByName("cf-turnstile-response") .getElementsByName("cf-turnstile-response")
.item(0) as HTMLInputElement; .item(0) as HTMLInputElement | null;
if (!tokenElem.value) { if (!tokenElem?.value) {
setLoading(false); setLoading(false);
return toast({ return toast({
description: "Please complete the captcha and try again", description: "Please complete the captcha and try again",