We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 49d4d32 + 142ad75 commit 55a2d81Copy full SHA for 55a2d81
src/utils/common-utils.js
@@ -151,8 +151,11 @@ export function replaceState(rawElementId) {
151
const newQuery = query.toString().length > 1 ? `${query.toString()}&route=${elementId}` : `route=${elementId}`;
152
153
const fragment = `#${currentNavigationHashPart}?${newQuery}`;
154
- const url = new URL(fragment, window.location.href);
155
- window.history.pushState(null, null, url.href);
+ const currentHref = window.location.href;
+ const url = new URL(fragment, currentHref);
156
+ if (url.href !== currentHref) {
157
+ window.history.pushState(null, null, url.href);
158
+ }
159
}
160
161
export function toMarkdown(markdownStringRaw) {
0 commit comments