New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
errors when navigating back and forth from error pages #14693
Comments
A workaround is wrapping the app.vue: <script setup lang="ts">
import ErrorPage from './error.vue'
</script>
<template>
<NuxtErrorBoundary>
<NuxtLayout>
<NuxtLoadingIndicator :color="themeColor" />
<NuxtPage />
</NuxtLayout>
<template #error="{ error }">
<ErrorPage
:error="error"
in-error-boundary
@clear-error="
() => {
error.value = null
}
"
/>
</template>
</NuxtErrorBoundary>
</template> To be able to clear the error correctly, I needed to create a event to be able to set |
To automatically clear the error, like with normal onMounted(() => {
if (props.inErrorBoundary) {
const router = useRouter()
router.afterEach(() => {
console.debug('Manually clearing error in NuxtErrorBoundary')
emit('clearError')
})
}
}) |
The problem seems to only happen, because of an async setup (using await) in |
Probably assiciated with vuejs/core#6463 |
tracking in #13309 |
reproduction: https://stackblitz.com/edit/github-cmeky2-mysxox
Context: #13788
The text was updated successfully, but these errors were encountered: