mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +00:00
fix(nuxt): defer unsetting error handler until suspense resolves (#29037)
This commit is contained in:
parent
215ae69192
commit
5faf720b42
@ -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