From 7c1052f3f75f908a74794653d10843bc718b29a0 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Wed, 15 Nov 2023 11:11:25 +0100 Subject: [PATCH] docs(ComponentCard): add `code` prop to key to prevent duplicates --- docs/components/content/ComponentCard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/content/ComponentCard.vue b/docs/components/content/ComponentCard.vue index 8afc1879..b068b663 100644 --- a/docs/components/content/ComponentCard.vue +++ b/docs/components/content/ComponentCard.vue @@ -247,7 +247,7 @@ function renderObject (obj: any) { const shikiHighlighter = useShikiHighlighter({}) const codeHighlighter = async (code: string, lang: string, theme: any, highlights: number[]) => shikiHighlighter.getHighlightedAST(code, lang, theme, { highlights }) const { data: ast } = await useAsyncData( - `${name}-ast-${JSON.stringify({ props: componentProps, slots: props.slots })}`, + `${name}-ast-${JSON.stringify({ props: componentProps, slots: props.slots, code: props.code })}`, async () => { let formatted = '' try {