Fix weird token element null issue
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user