Преглед на файлове

fix: fix reCAPTCHA loading error via #61

梁志博 преди 7 години
родител
ревизия
4dad7c478f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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) {