Skip to content

Commit

Permalink
dont replace url with same path
Browse files Browse the repository at this point in the history
  • Loading branch information
jemikanegara committed Nov 29, 2024
1 parent fc7759a commit b3b0600
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion replaceLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function replaceLinks(window, {langParam, lang, translationMode, prefix, sourceO

// Update the href of the anchor tag
anchor.href = url.href;
} else if (anchor.href !== `${window.location.href}#`) {
} else if ((anchor.href !== `${window.location.href}#`) && (anchor.pathname != window.location.pathname)) {
// Check if the link is internal and does not contain a hash

// Create a new URL object
Expand Down

0 comments on commit b3b0600

Please sign in to comment.