From 45356ec3ae7befb77192fda67c84e6a34f923709 Mon Sep 17 00:00:00 2001 From: Matthieu Date: Thu, 18 Sep 2025 08:44:38 +0200 Subject: [PATCH] fix: limit profile redirect middleware to client --- app/middleware/profile.global.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/middleware/profile.global.ts b/app/middleware/profile.global.ts index 518b4f7..97f8b53 100644 --- a/app/middleware/profile.global.ts +++ b/app/middleware/profile.global.ts @@ -13,9 +13,7 @@ export default defineNuxtRouteMiddleware(async (to) => { fullPath.startsWith('/profiles') || routeName.startsWith('profiles') - if (!activeProfile.value && !isProfilesRoute) { - if (!normalizedPath.startsWith('/profiles')) { - return navigateTo('/profiles') - } + if (process.client && !activeProfile.value && !isProfilesRoute) { + return navigateTo('/profiles') } })