mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-07 17:32:31 +00:00
fix(nuxt): catch error in NuxtErrorBoundary
with ssr: false
(#24896)
This commit is contained in:
parent
c28ef02a17
commit
8ba118facb
@ -12,7 +12,7 @@ export default defineComponent({
|
|||||||
const nuxtApp = useNuxtApp()
|
const nuxtApp = useNuxtApp()
|
||||||
|
|
||||||
onErrorCaptured((err, target, info) => {
|
onErrorCaptured((err, target, info) => {
|
||||||
if (import.meta.client && !nuxtApp.isHydrating) {
|
if (import.meta.client && (!nuxtApp.isHydrating || !nuxtApp.payload.serverRendered)) {
|
||||||
emit('error', err)
|
emit('error', err)
|
||||||
nuxtApp.hooks.callHook('vue:error', err, target, info)
|
nuxtApp.hooks.callHook('vue:error', err, target, info)
|
||||||
error.value = err
|
error.value = err
|
||||||
|
Loading…
Reference in New Issue
Block a user