mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(nuxt): respect navigateTo
options using server middleware in server-side (#5145)
This commit is contained in:
parent
1e8fba8378
commit
1fda73267a
@ -60,7 +60,8 @@ export const navigateTo = (to: RouteLocationRaw, options: NavigateToOptions = {}
|
||||
if (!to) {
|
||||
to = '/'
|
||||
}
|
||||
if (isProcessingMiddleware()) {
|
||||
// Early redirect on client-side since only possible option is redirectCode and not applied
|
||||
if (process.client && isProcessingMiddleware()) {
|
||||
return to
|
||||
}
|
||||
const router = useRouter()
|
||||
|
Loading…
Reference in New Issue
Block a user