mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 02:56:20 -05:00
always load captcha on email step
This commit is contained in:
parent
3e6e87c3a4
commit
8b78fcb8db
1 changed files with 4 additions and 2 deletions
|
@ -39,8 +39,10 @@ class EmailStep extends React.Component {
|
||||||
// automatically start with focus on username field
|
// automatically start with focus on username field
|
||||||
if (this.emailInput) this.emailInput.focus();
|
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
|
// ReCaptcha calls a callback when the grecatpcha object is usable. That callback
|
||||||
// needs to be global so set it on the window.
|
// needs to be global so set it on the window.
|
||||||
window.grecaptchaOnLoad = this.onCaptchaLoad;
|
window.grecaptchaOnLoad = this.onCaptchaLoad;
|
||||||
|
|
Loading…
Reference in a new issue