fix(portal): access ref value in login form submission

form is a ref() — in <script setup>, .value is required to access
the inner object. form.email was undefined at runtime, causing a
TypeError that was caught and shown as the generic login error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-13 08:30:51 +02:00
parent 6250421355
commit 0d5523dbfe

View File

@@ -55,7 +55,7 @@ async function onSubmit(): Promise<void> {
errorMessage.value = ''
isSubmitting.value = true
try {
await authStore.login(form.email.trim(), form.password)
await authStore.login(form.value.email.trim(), form.value.password)
await portalStore.hydrateAfterAuth()
const redirect = typeof route.query.to === 'string' ? route.query.to : '/dashboard'
await router.replace(redirect || '/dashboard')