File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11import { warn } from '../util'
22const trailingSlashRE = / \/ $ /
33const regexEscapeRE = / [ - . * + ? ^ $ { } ( ) | [ \] \/ \\ ] / g
4+ const queryStringRE = / \? .* $ /
45
56// install v-link, which provides navigation support for
67// HTML5 history mode
@@ -110,15 +111,15 @@ export default function (Vue) {
110111
111112 updateClasses ( path ) {
112113 let el = this . el
113- let dest = this . path
114114 let router = this . vm . $route . router
115115 let activeClass = this . activeClass || router . _linkActiveClass
116116 // clear old class
117117 if ( this . prevActiveClass !== activeClass ) {
118118 _ . removeClass ( el , this . prevActiveClass )
119119 }
120120 // remove query string before matching
121- path = path . replace ( / \? .* $ / , '' )
121+ let dest = this . path . replace ( queryStringRE , '' )
122+ path = path . replace ( queryStringRE , '' )
122123 // add new class
123124 if ( this . exact ) {
124125 if (
You can’t perform that action at this time.
0 commit comments