Skip to content

Commit

Permalink
v-link: should work on non-anchor elements (fix #156)
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Oct 1, 2015
1 parent 9335a80 commit 4b28825
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/directives/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function (Vue) {
// don't redirect on right click
if (e.button !== 0) return

if (this.el.tagName === 'A') {
if (this.el.tagName === 'A' || e.target === this.el) {
// v-link on <a v-link="'path'">
e.preventDefault()
if (this.destination != null) {
Expand Down

0 comments on commit 4b28825

Please sign in to comment.