Explorar o código

fix: fix reCAPTCHA loading error via #61

梁志博 %!s(int64=7) %!d(string=hai) anos
pai
achega
4dad7c478f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      client/helpers/recaptcha.js

+ 1 - 1
client/helpers/recaptcha.js

@@ -1,7 +1,7 @@
 export default function showRecaptcha() {
   const captcha = document.getElementById('g-recaptcha');
   if (!captcha) return null;
-  if (!window.grecaptcha) {
+  if (!window.grecaptcha || !window.grecaptcha.render) {
     return setTimeout(() => showRecaptcha(), 200);
   }
   if (!captcha.childNodes.length) {