mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(nuxt3): remove workaround for unfulfilled initial navigation (#3436)
* fix(router): remove error workaround * chore: deduplicate vue-router * chore: update lockfile Co-authored-by: Pooya Parsa <pyapar@gmail.com>
This commit is contained in:
parent
fcb200730d
commit
17bf70ae1c
@ -56,7 +56,7 @@
|
||||
"typescript": "^4.5.5",
|
||||
"unbuild": "^0.6.9",
|
||||
"vitest": "^0.5.8",
|
||||
"vue-router": "next",
|
||||
"vue-router": "^4.0.13",
|
||||
"vue-tsc": "^0.32.0"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -96,11 +96,9 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
const result = await callWithNuxt(nuxtApp as NuxtApp, middleware, [to, from])
|
||||
if (process.server) {
|
||||
if (result === false || result instanceof Error) {
|
||||
const error = result || createError({
|
||||
return result || createError({
|
||||
statusMessage: `Route navigation aborted: ${nuxtApp.ssrContext.url}`
|
||||
})
|
||||
nuxtApp.ssrContext.error = error
|
||||
throw error
|
||||
}
|
||||
}
|
||||
if (result || result === false) { return result }
|
||||
|
Loading…
Reference in New Issue
Block a user