Skip to content

Commit

Permalink
fix(nuxt): catch error in NuxtErrorBoundary with ssr: false (#24896)
Browse files Browse the repository at this point in the history
  • Loading branch information
huang-julien committed Dec 25, 2023
1 parent c28ef02 commit 8ba118f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nuxt/src/app/components/nuxt-error-boundary.ts
Expand Up @@ -12,7 +12,7 @@ export default defineComponent({
const nuxtApp = useNuxtApp()

onErrorCaptured((err, target, info) => {
if (import.meta.client && !nuxtApp.isHydrating) {
if (import.meta.client && (!nuxtApp.isHydrating || !nuxtApp.payload.serverRendered)) {
emit('error', err)
nuxtApp.hooks.callHook('vue:error', err, target, info)
error.value = err
Expand Down

0 comments on commit 8ba118f

Please sign in to comment.