Эх сурвалжийг харах

Merge pull request #66 from fredliang44/fix/reCAPTCHA-load-error

fix: fix reCAPTCHA loading error via #61
Pouria Ezzati 7 жил өмнө
parent
commit
b1167edad0

+ 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) {