We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 24fb723 + f9ac4ec commit 49d4d32Copy full SHA for 49d4d32
src/utils/common-utils.js
@@ -149,7 +149,10 @@ export function replaceState(rawElementId) {
149
const query = new URLSearchParams(currentQuery);
150
query.delete('route');
151
const newQuery = query.toString().length > 1 ? `${query.toString()}&route=${elementId}` : `route=${elementId}`;
152
- window.history.pushState(null, null, `#${currentNavigationHashPart}?${newQuery}`);
+
153
+ const fragment = `#${currentNavigationHashPart}?${newQuery}`;
154
+ const url = new URL(fragment, window.location.href);
155
+ window.history.pushState(null, null, url.href);
156
}
157
158
export function toMarkdown(markdownStringRaw) {
0 commit comments