From 31e5f0bd09175baba8b1cc9e617c83934b423596 Mon Sep 17 00:00:00 2001
From: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Date: Sun, 10 Nov 2024 15:08:58 +0900
Subject: fix(frontend):
 メールアドレス登録有効化時の「完了」ダイアログボックスの表示条件を修正
 (#14928)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* fix(frontend): メールアドレス登録有効化時の「完了」ダイアログボックスの表示条件を修正

* Update MkSignupDialog.form.vue

* fix condition
---
 packages/frontend/src/components/MkSignupDialog.form.vue | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'packages/frontend/src/components/MkSignupDialog.form.vue')

diff --git a/packages/frontend/src/components/MkSignupDialog.form.vue b/packages/frontend/src/components/MkSignupDialog.form.vue
index 3d1c44fc90..e1f4e26d62 100644
--- a/packages/frontend/src/components/MkSignupDialog.form.vue
+++ b/packages/frontend/src/components/MkSignupDialog.form.vue
@@ -277,7 +277,7 @@ async function onSubmit(): Promise<void> {
 		return null;
 	});
 
-	if (res) {
+	if (res && res.ok) {
 		if (res.status === 204 || instance.emailRequiredForSignup) {
 			os.alert({
 				type: 'success',
@@ -295,6 +295,8 @@ async function onSubmit(): Promise<void> {
 				await login(resJson.token);
 			}
 		}
+	} else {
+		onSignupApiError();
 	}
 
 	submitting.value = false;
-- 
cgit v1.2.3-freya

