From 26e8b48deb241153238069fd6f4159418ac72ffe Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Thu, 12 Aug 2021 16:10:07 -0400 Subject: [PATCH] Set up captcha iframe only on submit of login (#453) --- angular/src/components/login.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/angular/src/components/login.component.ts b/angular/src/components/login.component.ts index a77eb724ac5..3210c0d1bc3 100644 --- a/angular/src/components/login.component.ts +++ b/angular/src/components/login.component.ts @@ -65,11 +65,11 @@ export class LoginComponent extends CaptchaProtectedComponent implements OnInit if (Utils.isBrowser && !Utils.isNode) { this.focusInput(); } - - this.setupCaptcha(); } async submit() { + await this.setupCaptcha(); + if (this.email == null || this.email === '') { this.platformUtilsService.showToast('error', this.i18nService.t('errorOccurred'), this.i18nService.t('emailRequired'));