Skip to content

Commit 0bfafcd

Browse files
committed
fix(MDC): props mistmatch
1 parent c88db40 commit 0bfafcd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/runtime/components/MDC.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
:excerpt="data?.excerpt"
77
>
88
<MDCRenderer
9+
v-if="body"
910
:tag="tag"
1011
:class="props.class"
11-
:body="excerpt ? data?.excerpt : data?.body"
12+
:body="body"
1213
:data="data?.data"
1314
/>
1415
</slot>
@@ -65,6 +66,8 @@ const { data, refresh } = await useAsyncData(key.value, async () => {
6566
return await parseMarkdown(props.value, props.parserOptions)
6667
})
6768
69+
const body = computed(() => props.excerpt ? data.value?.excerpt : data.value?.body)
70+
6871
watch(() => props.value, () => {
6972
refresh()
7073
})

0 commit comments

Comments
 (0)