diff --git a/apps/frontend/src/components/ui/HCaptcha.vue b/apps/frontend/src/components/ui/HCaptcha.vue index 3421afa01..bacc2516a 100644 --- a/apps/frontend/src/components/ui/HCaptcha.vue +++ b/apps/frontend/src/components/ui/HCaptcha.vue @@ -12,17 +12,21 @@ function hCaptchaReady() { } onMounted(() => { - window.hCaptchaReady = hCaptchaReady; - - useHead({ - script: [ - { - src: "https://js.hcaptcha.com/1/api.js?render=explicit&onload=hCaptchaReady", - async: true, - defer: true, - }, - ], - }); + if (window.hcaptcha) { + hCaptchaReady(); + } else { + window.hCaptchaReady = hCaptchaReady; + + useHead({ + script: [ + { + src: "https://js.hcaptcha.com/1/api.js?render=explicit&onload=hCaptchaReady", + async: true, + defer: true, + }, + ], + }); + } }); defineExpose({