mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 00:52:01 +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
|
||||
// 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 {
|
||||
await applyPlugins(nuxt, plugins)
|
||||
@ -84,9 +88,6 @@ if (import.meta.client) {
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user