Browse Source

Merge pull request #162 from RomanticCat/master

Update main.js
Jason 8 years ago
parent
commit
d51cf331a2
1 changed files with 6 additions and 4 deletions
  1. 6 4
      src/main/webapp/public/resources/js/main.js

+ 6 - 4
src/main/webapp/public/resources/js/main.js

@@ -400,10 +400,12 @@ PWM_MAIN.handleLoginFormSubmit = function(form, event) {
                 }
             };
             PWM_MAIN.ajaxRequest(url,loadFunction,options);
-            try {
-                grecaptcha.reset(); // reset the
-            } catch (e) {
-                console.log("error resetting the captcha: " + e)
+            if(typeof grecaptcha != 'undefined'){
+                try {
+                   grecaptcha.reset(); // reset the
+                } catch (e) {
+                    console.log("error resetting the captcha: " + e)
+                }
             }
         }});
     });