From 6331c76ca8d4b0b6e5608326ed5c38d683c02cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E9=93=84=E8=BF=90?= Date: Thu, 22 Dec 2016 03:32:58 +0800 Subject: [PATCH] Fix checking e.button for non-mouse events Fix checking e.button for non-mouse events on router-link (fix #1036) --- src/components/link.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/link.js b/src/components/link.js index fd1b9a3ac..f180c6f26 100644 --- a/src/components/link.js +++ b/src/components/link.js @@ -91,7 +91,7 @@ function guardEvent (e) { if (e.defaultPrevented) return // don't redirect on right click /* istanbul ignore if */ - if (e.button !== 0) return + if (e.button !== undefined && e.button !== 0) return // don't redirect if `target="_blank"` /* istanbul ignore if */ if (e.target && e.target.getAttribute) {