mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(nuxt): defer unsetting error handler until suspense resolves (#29037)
This commit is contained in:
parent
08891ab126
commit
04f1062af9
@ -67,6 +67,10 @@ if (import.meta.client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
vueApp.config.errorHandler = handleVueError
|
vueApp.config.errorHandler = handleVueError
|
||||||
|
// If the errorHandler is not overridden by the user, we unset it after the app is hydrated
|
||||||
|
nuxt.hook('app:suspense:resolve', () => {
|
||||||
|
if (vueApp.config.errorHandler === handleVueError) { vueApp.config.errorHandler = undefined }
|
||||||
|
})
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await applyPlugins(nuxt, plugins)
|
await applyPlugins(nuxt, plugins)
|
||||||
@ -84,9 +88,6 @@ if (import.meta.client) {
|
|||||||
handleVueError(err)
|
handleVueError(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the errorHandler is not overridden by the user, we unset it
|
|
||||||
if (vueApp.config.errorHandler === handleVueError) { vueApp.config.errorHandler = undefined }
|
|
||||||
|
|
||||||
return vueApp
|
return vueApp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user