diff --git a/packages/nuxt/src/app/components/client-fallback.server.ts b/packages/nuxt/src/app/components/client-fallback.server.ts index 4e8dfe864c..c1bc3c3e02 100644 --- a/packages/nuxt/src/app/components/client-fallback.server.ts +++ b/packages/nuxt/src/app/components/client-fallback.server.ts @@ -41,9 +41,10 @@ const NuxtClientFallbackServer = defineComponent({ const vm = getCurrentInstance() const ssrFailed = ref(false) const nuxtApp = useNuxtApp() + const error = useState(`${props.uid}`) onErrorCaptured((err) => { - useState(`${props.uid}`, () => true) + error.value = true ssrFailed.value = true ctx.emit('ssr-error', err) return false