fix: limit profile redirect middleware to client
This commit is contained in:
@@ -13,9 +13,7 @@ export default defineNuxtRouteMiddleware(async (to) => {
|
|||||||
fullPath.startsWith('/profiles') ||
|
fullPath.startsWith('/profiles') ||
|
||||||
routeName.startsWith('profiles')
|
routeName.startsWith('profiles')
|
||||||
|
|
||||||
if (!activeProfile.value && !isProfilesRoute) {
|
if (process.client && !activeProfile.value && !isProfilesRoute) {
|
||||||
if (!normalizedPath.startsWith('/profiles')) {
|
return navigateTo('/profiles')
|
||||||
return navigateTo('/profiles')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user