From ac3673e111afac6616af9650ca07028b6c27e6cd Mon Sep 17 00:00:00 2001 From: WeidiDeng Date: Tue, 8 Dec 2020 18:26:29 +0800 Subject: [PATCH] fix: recaptcha race condition (#1176) --- frontend/src/views/Login.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/Login.vue b/frontend/src/views/Login.vue index 5464a053..a3f1df5d 100644 --- a/frontend/src/views/Login.vue +++ b/frontend/src/views/Login.vue @@ -41,8 +41,10 @@ export default { mounted () { if (!recaptcha) return - window.grecaptcha.render('recaptcha', { - sitekey: recaptchaKey + window.grecaptcha.ready(function () { + window.grecaptcha.render('recaptcha', { + sitekey: recaptchaKey + }) }) }, methods: {