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

This commit is contained in:
Lehoczky Zoltán 2023-05-11 23:54:07 +02:00 committed by GitHub
parent 83c7172ace
commit 6b7197fd8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
const { error } = props
// TODO: extract to a separate utility
const stacktrace = (error.stack || '')
.split('\n')