Skip to content

Commit

Permalink
Fix captcha not showing on create account page
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Nov 19, 2024
1 parent 3b0e59c commit 8cd77ad
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions apps/frontend/src/components/ui/HCaptcha.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 8cd77ad

Please sign in to comment.