Skip to content

Commit 1a865a1

Browse files
committed
fix(<MarkDown>): prevent multiple deprecation log (#1497)
1 parent 96e1e60 commit 1a865a1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/runtime/components/Markdown.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import ContentSlot from './ContentSlot'
33
import { defineComponent, getCurrentInstance, useSlots, computed } from '#imports'
44
5+
let showDeprecatedMessage = true
6+
57
/**
68
* Markdown component
79
*/
@@ -10,9 +12,10 @@ export default defineComponent({
1012
name: 'Markdown',
1113
extends: ContentSlot,
1214
setup (props) {
13-
if (process.dev) {
15+
if (process.dev && showDeprecatedMessage) {
1416
// eslint-disable-next-line no-console
1517
console.warn('[deprecation] <Markdown> component is deprecated. Please use <ContentSlot> instead.')
18+
showDeprecatedMessage = false
1619
}
1720
const { parent } = getCurrentInstance()
1821
const { between, default: fallbackSlot } = useSlots()

0 commit comments

Comments
 (0)