mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +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])
|
||||
if (process.server) {
|
||||
if (process.server || (!nuxtApp.payload.serverRendered && nuxtApp.isHydrating)) {
|
||||
if (result === false || result instanceof Error) {
|
||||
const error = result || createError({
|
||||
statusMessage: `Route navigation aborted: ${initialURL}`
|
||||
|
Loading…
Reference in New Issue
Block a user