Skip to content

Commit

Permalink
minor fix for selector
Browse files Browse the repository at this point in the history
  • Loading branch information
jemikanegara committed Oct 21, 2024
1 parent 2094f60 commit e8ab6cf
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 @@ -12,7 +12,7 @@ function replaceLinks(window, {langParam, lang, translationMode, prefix}) {
let anchor = anchors[i];

// assign full url if it's relative path
if (!anchor.href.startsWith("http")) {
if (!anchor.href.startsWith("http") && (anchor.getAttribute("href") != "#")) {
const currentUrl = new URL(window.location.href);
const fullHref = `${currentUrl.protocol}//${currentUrl.hostname}${anchor.href}`;
anchor.href = fullHref;
Expand Down

0 comments on commit e8ab6cf

Please sign in to comment.