mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +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) {
|
if (!to) {
|
||||||
to = '/'
|
to = '/'
|
||||||
}
|
}
|
||||||
if (isProcessingMiddleware()) {
|
// Early redirect on client-side since only possible option is redirectCode and not applied
|
||||||
|
if (process.client && isProcessingMiddleware()) {
|
||||||
return to
|
return to
|
||||||
}
|
}
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
Loading…
Reference in New Issue
Block a user