Skip to content
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

fix(nuxt): avoid destructuring error prop (works around upstream bug) #20795

Merged
merged 4 commits into from May 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/nuxt/src/app/components/nuxt-error-page.vue
Expand Up @@ -5,12 +5,14 @@
<script setup>
import { defineAsyncComponent } from 'vue'

// Deliberately prevent reactive update when error is cleared
// eslint-disable-next-line vue/no-setup-props-destructure
const { error } = defineProps({
const props = defineProps({
error: Object
})

// Deliberately prevent reactive update when error is cleared
// eslint-disable-next-line vue/no-setup-props-destructure
Lehoczky marked this conversation as resolved.
Show resolved Hide resolved
const { error } = props

// TODO: extract to a separate utility
const stacktrace = (error.stack || '')
.split('\n')
Expand Down