File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ function pathWithHash(location) {
2525 return `${ location . pathname } ${ location . hash } ` ;
2626}
2727
28+ function isInsiveVue ( el ) {
29+ if ( el === document . body ) return false
30+ return el . __vue__ || el . _vnode || isInsideVue ( el . parentElement )
31+ }
32+
2833export default function setupHistoryListeners ( ) {
2934 function handleMessage ( data , source ) {
3035 if ( source ) {
@@ -109,7 +114,7 @@ export default function setupHistoryListeners() {
109114 const el = ev . target ;
110115 if (
111116 el . nodeName === 'A' &&
112- ! el . __vue__ && // workaround for vue-router <router-link>
117+ ! isInsideVue ( el ) && // workaround for vue-router <router-link>
113118 el . href . indexOf ( '#' ) !== - 1 &&
114119 el . href . substr ( - 1 ) !== '#'
115120 ) {
You can’t perform that action at this time.
0 commit comments