fix condition

This commit is contained in:
kakkokari-gtyih 2024-11-10 14:53:30 +09:00
parent d6e443f333
commit 13d3db02e4

View file

@ -277,8 +277,8 @@ async function onSubmit(): Promise<void> {
return null; return null;
}); });
if (res) { if (res && res.ok) {
if (res.status === 204 && instance.emailRequiredForSignup) { if (res.status === 204 || instance.emailRequiredForSignup) {
os.alert({ os.alert({
type: 'success', type: 'success',
title: i18n.ts._signup.almostThere, title: i18n.ts._signup.almostThere,
@ -295,6 +295,8 @@ async function onSubmit(): Promise<void> {
await login(resJson.token); await login(resJson.token);
} }
} }
} else {
onSignupApiError();
} }
submitting.value = false; submitting.value = false;