We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26cc466 commit 91d6337Copy full SHA for 91d6337
src/core/router/history/hash.js
@@ -81,7 +81,9 @@ export class HashHistory extends History {
81
path = path.replace(/\.md(\?)|\.md$/, '$1')
82
83
if (local) {
84
- path = currentRoute.substr(0, currentRoute.indexOf('?')) + path
+ const idIndex = currentRoute.indexOf('?')
85
+ path =
86
+ (idIndex > 0 ? currentRoute.substr(0, idIndex) : currentRoute) + path
87
}
88
89
return cleanPath('#/' + path)
0 commit comments