From 8b78fcb8dbd7ab522cf8aca279a2fd52d91d6f2c Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Thu, 17 Oct 2019 22:22:44 -0400 Subject: [PATCH] always load captcha on email step --- src/components/join-flow/email-step.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/join-flow/email-step.jsx b/src/components/join-flow/email-step.jsx index a691e0604..fa1e27400 100644 --- a/src/components/join-flow/email-step.jsx +++ b/src/components/join-flow/email-step.jsx @@ -39,8 +39,10 @@ class EmailStep extends React.Component { // automatically start with focus on username field if (this.emailInput) this.emailInput.focus(); - // If grecaptcha doesn't exist on window, we havent loaded the captcha js yet. Load it. - if (!window.grecaptcha) { + if (window.grecaptcha) { + this.onCaptchaLoad(); + } else { + // If grecaptcha doesn't exist on window, we havent loaded the captcha js yet. Load it. // ReCaptcha calls a callback when the grecatpcha object is usable. That callback // needs to be global so set it on the window. window.grecaptchaOnLoad = this.onCaptchaLoad;