Skip to content

Commit

Permalink
fix(warn): only warn if "tag" or "event" is used (#3458)
Browse files Browse the repository at this point in the history
closes #3457
  • Loading branch information
jonaskuske authored Jan 26, 2021
1 parent 711315e commit b7a31b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
`<router-link>'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,
`<router-link>'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.`
Expand Down

0 comments on commit b7a31b9

Please sign in to comment.