fix: limit profile redirect middleware to client
This commit is contained in:
@@ -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')
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user