diff --git a/src/components/link.js b/src/components/link.js index a84e10ed5..9c2a25784 100644 --- a/src/components/link.js +++ b/src/components/link.js @@ -132,14 +132,14 @@ export default { } if (process.env.NODE_ENV !== 'production') { - if (this.tag && !warnedTagProp) { + if ('tag' in this.$options.propsData && !warnedTagProp) { warn( false, `'s tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link.` ) warnedTagProp = true } - if (this.event && !warnedEventProp) { + if ('event' in this.$options.propsData && !warnedEventProp) { warn( false, `'s event prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link.`