We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ca9883 commit a52287eCopy full SHA for a52287e
src/history/hash.js
@@ -92,8 +92,6 @@ function pushHash (path) {
92
function replaceHash (path) {
93
const href = window.location.href
94
const i = href.indexOf('#')
95
-
96
- window.location.replace(
97
- window.location.href.slice(0, i >= 0 ? i : href.length) + '#' + path
98
- )
+ const base = i >= 0 ? href.slice(0, i) : href
+ window.location.replace(`${base}#${path}`)
99
}
0 commit comments