From 0e2ea5c42ade932e8debd118ccd8c47415ed32ef Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 6 Feb 2026 10:21:13 +0100 Subject: [PATCH] fix: avoid clearing saved redirect in onBeforeMount to prevent race with submit When Login.vue re-mounts inside the authenticated layout after a successful login, its onBeforeMount hook fires again. If it calls redirectIfSaved(), it clears the saved route from localStorage before the submit() handler's redirectIfSaved() can use it, causing a redirect to home instead of the saved route. Use router.push({name: 'home'}) directly since the only purpose here is to redirect already-authenticated users away from the login page. --- frontend/src/views/user/Login.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/user/Login.vue b/frontend/src/views/user/Login.vue index 09202fd35..9eda9088a 100644 --- a/frontend/src/views/user/Login.vue +++ b/frontend/src/views/user/Login.vue @@ -125,6 +125,7 @@