We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f6888f commit 0157ad0Copy full SHA for 0157ad0
src/directives/link.js
@@ -118,6 +118,9 @@ export default function (Vue) {
118
},
119
120
updateHref () {
121
+ if (this.el.tagName !== 'A') {
122
+ return
123
+ }
124
if (this.target && this.target.name) {
125
this.el.href = '#' + this.target.name
126
return
@@ -129,12 +132,10 @@ export default function (Vue) {
129
132
const href = path && (router.mode === 'hash' || isAbsolute)
130
133
? router.history.formatPath(path, this.append)
131
134
: path
- if (this.el.tagName === 'A') {
- if (href) {
- this.el.href = href
135
- } else {
136
- this.el.removeAttribute('href')
137
- }
+ if (href) {
+ this.el.href = href
+ } else {
138
+ this.el.removeAttribute('href')
139
}
140
141
0 commit comments