Skip to content

Commit

Permalink
Replaced .replace to .href
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSamJacob19 committed Jul 11, 2024
1 parent 7bb764a commit eb3fce3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/content/_assets/js/antora-redirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $(document).ready(function () {
if (hash.indexOf("#") === 0) {
hash = hash.substring(1); // Remove hash
}
window.location.replace(window.location.origin + "/docs/latest/" + hash);
window.location.href= window.location.origin + "/docs/latest/" + hash;
} else if (
path.indexOf("/docs/ref/feature/") > -1 ||
path.indexOf("/docs/ref/config/") > -1 ||
Expand Down Expand Up @@ -48,13 +48,12 @@ $(document).ready(function () {
break;
}
}
window.location.replace(
window.location.href =
window.location.origin +
"/docs/latest/reference/" +
resource_type +
"/" +
page +
hash
);
hash;
}
});

0 comments on commit eb3fce3

Please sign in to comment.