forked from leftypol/leftypol
main.js: do not initialize captchas if there is no hook
This commit is contained in:
parent
111fa78921
commit
3994afd10d
1 changed files with 4 additions and 2 deletions
|
@ -349,8 +349,10 @@ function isDynamicCaptchaEnabled() {
|
||||||
function initCaptcha() {
|
function initCaptcha() {
|
||||||
if (isDynamicCaptchaEnabled()) {
|
if (isDynamicCaptchaEnabled()) {
|
||||||
let captcha_hook = document.getElementById('captcha');
|
let captcha_hook = document.getElementById('captcha');
|
||||||
captcha_hook.style = "";
|
if (captcha_hook) {
|
||||||
initCaptchaImpl();
|
captcha_hook.style = "";
|
||||||
|
initCaptchaImpl();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{% endif %} // End if dynamic captcha
|
{% endif %} // End if dynamic captcha
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue