From e2dee350a2a65cf9226d29ad55af433d12296341 Mon Sep 17 00:00:00 2001 From: Casey Williams Date: Mon, 20 Feb 2023 22:33:17 -0500 Subject: [PATCH] Fix registration bug caused by optional recaptcha --- UT4MasterServer.Web/src/pages/Register.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UT4MasterServer.Web/src/pages/Register.vue b/UT4MasterServer.Web/src/pages/Register.vue index 20f5ccec..cfb44e44 100644 --- a/UT4MasterServer.Web/src/pages/Register.vue +++ b/UT4MasterServer.Web/src/pages/Register.vue @@ -100,13 +100,14 @@ import { valid as vValid } from '@/directives/valid'; import { VueRecaptcha } from 'vue-recaptcha'; import { IRegisterRequest } from '@/types/register-request'; +const recaptchaSiteKey = __RECAPTCHA_SITE_KEY; const username = shallowRef(''); const password = shallowRef(''); const email = shallowRef(''); const status = shallowRef(AsyncStatus.OK); const emailValid = computed(() => validateEmail(email.value)); const passwordValid = computed(() => validatePassword(password.value)); -const recaptchaValid = shallowRef(false); +const recaptchaValid = shallowRef(!recaptchaSiteKey); const formValid = computed( () => emailValid.value && @@ -116,7 +117,6 @@ const formValid = computed( ); const errorMessage = shallowRef('Error registering account. Please try again.'); const submitAttempted = shallowRef(false); -const recaptchaSiteKey = __RECAPTCHA_SITE_KEY; const recaptchaToken = shallowRef(undefined); const accountService = new AccountService();