From b7a31b9bd6f3c1c09e5282f716aae892d10a3d5c Mon Sep 17 00:00:00 2001 From: Jonas <30421456+jonaskuske@users.noreply.github.com> Date: Tue, 26 Jan 2021 10:19:30 +0100 Subject: [PATCH] fix(warn): only warn if "tag" or "event" is used (#3458) closes #3457 --- src/components/link.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.`