mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
fix(nuxt): avoid destructuring error prop (works around upstream bug) (#20795)
This commit is contained in:
parent
83c7172ace
commit
6b7197fd8c
@ -5,12 +5,14 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
// Deliberately prevent reactive update when error is cleared
|
const props = defineProps({
|
||||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
|
||||||
const { error } = defineProps({
|
|
||||||
error: Object
|
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
|
// TODO: extract to a separate utility
|
||||||
const stacktrace = (error.stack || '')
|
const stacktrace = (error.stack || '')
|
||||||
.split('\n')
|
.split('\n')
|
||||||
|
Loading…
Reference in New Issue
Block a user