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 1
1
import { warn } from '../util'
2
2
const trailingSlashRE = / \/ $ /
3
3
const regexEscapeRE = / [ - . * + ? ^ $ { } ( ) | [ \] \/ \\ ] / g
4
+ const queryStringRE = / \? .* $ /
4
5
5
6
// install v-link, which provides navigation support for
6
7
// HTML5 history mode
@@ -110,15 +111,15 @@ export default function (Vue) {
110
111
111
112
updateClasses ( path ) {
112
113
let el = this . el
113
- let dest = this . path
114
114
let router = this . vm . $route . router
115
115
let activeClass = this . activeClass || router . _linkActiveClass
116
116
// clear old class
117
117
if ( this . prevActiveClass !== activeClass ) {
118
118
_ . removeClass ( el , this . prevActiveClass )
119
119
}
120
120
// remove query string before matching
121
- path = path . replace ( / \? .* $ / , '' )
121
+ let dest = this . path . replace ( queryStringRE , '' )
122
+ path = path . replace ( queryStringRE , '' )
122
123
// add new class
123
124
if ( this . exact ) {
124
125
if (
You can’t perform that action at this time.
0 commit comments