File tree 2 files changed +3
-20
lines changed
2 files changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -135,14 +135,9 @@ export function getHash (): string {
135
135
136
136
function getUrl ( path ) {
137
137
const href = window . location . href
138
- const hashPos = href . indexOf ( '#' )
139
- let base = hashPos > - 1 ? href . slice ( 0 , hashPos ) : href
140
-
141
- const searchPos = base . indexOf ( '?' )
142
- const query = searchPos > - 1 ? base . slice ( searchPos ) : ''
143
- base = query ? base . slice ( 0 , searchPos ) : base
144
-
145
- return `${ base } #${ path + query } `
138
+ const i = href . indexOf ( '#' )
139
+ const base = i >= 0 ? href . slice ( 0 , i ) : href
140
+ return `${ base } #${ path } `
146
141
}
147
142
148
143
function pushHash ( path ) {
Original file line number Diff line number Diff line change @@ -57,18 +57,6 @@ module.exports = {
57
57
. waitForElementVisible ( '#app' , 1000 )
58
58
. assert . containsText ( '.view' , 'unicode: ñ' )
59
59
. assert . containsText ( '#query-t' , '%' )
60
-
61
- // correctly placing query
62
- // https://github.com/vuejs/vue-router/issues/2125
63
- . url ( 'http://localhost:8080/hash-mode/?key=foo' )
64
- . waitForElementVisible ( '#app' , 1000 )
65
- . assert . urlEquals ( 'http://localhost:8080/hash-mode/#/?key=foo' )
66
- . url ( 'http://localhost:8080/hash-mode?key=foo' )
67
- . waitForElementVisible ( '#app' , 1000 )
68
- . assert . urlEquals ( 'http://localhost:8080/hash-mode/#/?key=foo' )
69
- . url ( 'http://localhost:8080/hash-mode?key=foo#other' )
70
- . waitForElementVisible ( '#app' , 1000 )
71
- . assert . urlEquals ( 'http://localhost:8080/hash-mode/#/other?key=foo' )
72
60
. end ( )
73
61
}
74
62
}
You can’t perform that action at this time.
0 commit comments