mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 21:58:19 +00:00
fix(nuxt): throw hard error on initial spa load if aborted (#6857)
This commit is contained in:
parent
347df12e9a
commit
aab90efc19
@ -143,7 +143,7 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const result = await callWithNuxt(nuxtApp, middleware, [to, from])
|
const result = await callWithNuxt(nuxtApp, middleware, [to, from])
|
||||||
if (process.server) {
|
if (process.server || (!nuxtApp.payload.serverRendered && nuxtApp.isHydrating)) {
|
||||||
if (result === false || result instanceof Error) {
|
if (result === false || result instanceof Error) {
|
||||||
const error = result || createError({
|
const error = result || createError({
|
||||||
statusMessage: `Route navigation aborted: ${initialURL}`
|
statusMessage: `Route navigation aborted: ${initialURL}`
|
||||||
|
Loading…
Reference in New Issue
Block a user