Skip to content

Commit

Permalink
Fix invite codes on login page not triggering login.
Browse files Browse the repository at this point in the history
  • Loading branch information
MelissaAutumn committed Sep 13, 2024
1 parent ef27446 commit 83c6687
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/src/views/LoginView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ const login = async () => {
email: email.value,
}).json();
console.log(error.value, canLogin.value);
if (error?.value) {
// Handle error
handleFormError(canLogin.value as PydanticException);
Expand All @@ -151,7 +150,7 @@ const login = async () => {
});
if (inviteCode.value) {
params.append('invite_code', inviteCode.value);
params.append('invite_code', inviteCode.value.trim());
}
const { error, data }: AuthUrlResponse = await call(`fxa_login?${params}`).get().json();
Expand Down Expand Up @@ -196,7 +195,7 @@ const onEnter = () => {
return;
}
if (loginStep.value === LoginSteps.SignUp || hideInviteField.value) {
if ((loginStep.value === LoginSteps.SignUp || hideInviteField.value) && inviteCode.value === '') {
signUp();
} else {
login();
Expand Down

0 comments on commit 83c6687

Please sign in to comment.