Skip to content

Commit 4709381

Browse files
fnlctrlyyx990803
authored andcommitted
Fix checking e.button for non-mouse events (#1037)
Fix checking e.button for non-mouse events on router-link (fix #1036)
1 parent 37326ca commit 4709381

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/link.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function guardEvent (e) {
9191
if (e.defaultPrevented) return
9292
// don't redirect on right click
9393
/* istanbul ignore if */
94-
if (e.button !== 0) return
94+
if (e.button !== undefined && e.button !== 0) return
9595
// don't redirect if `target="_blank"`
9696
/* istanbul ignore if */
9797
if (e.target && e.target.getAttribute) {

0 commit comments

Comments
 (0)