File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -34,15 +34,6 @@ export default function (Vue) {
3434 this . router = vm . $route . router
3535 // update things when the route changes
3636 this . unwatch = vm . $watch ( '$route' , bind ( this . onRouteUpdate , this ) )
37- // no need to handle click if link expects to be opened
38- // in a new window/tab.
39- /* istanbul ignore if */
40- if ( this . el . tagName === 'A' &&
41- this . el . getAttribute ( 'target' ) === '_blank' ) {
42- return
43- }
44- // handle click
45- this . el . addEventListener ( 'click' , bind ( this . onClick , this ) )
4637 // check if active classes should be applied to a different element
4738 this . activeEl = this . el
4839 var parent = this . el . parentNode
@@ -53,6 +44,15 @@ export default function (Vue) {
5344 }
5445 parent = parent . parentNode
5546 }
47+ // no need to handle click if link expects to be opened
48+ // in a new window/tab.
49+ /* istanbul ignore if */
50+ if ( this . el . tagName === 'A' &&
51+ this . el . getAttribute ( 'target' ) === '_blank' ) {
52+ return
53+ }
54+ // handle click
55+ this . el . addEventListener ( 'click' , bind ( this . onClick , this ) )
5656 } ,
5757
5858 update ( target ) {
You can’t perform that action at this time.
0 commit comments