Skip to content

Commit

Permalink
Merge pull request #682 from farshidtz/fix-version-switcher-ireland
Browse files Browse the repository at this point in the history
fix: stay on page after version switch (ireland)
  • Loading branch information
Siggi Skulason authored Jan 28, 2022
2 parents cfb5f66 + ddd08b5 commit fb2200c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 2 additions & 1 deletion docs_src/assets/javascripts/version-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ window.addEventListener("DOMContentLoaded", function () {
if (this.value === '1.1') {
window.location.href = "https://fuji-docs.edgexfoundry.org"
} else {
window.location.href = "/" + this.value;
// replace version in the beginning of path with selected version
window.location.pathname = window.location.pathname.replace(/^\/(\d.\d)\//, `/${this.value}/`);
}
});

Expand Down
6 changes: 0 additions & 6 deletions versions.json

This file was deleted.

0 comments on commit fb2200c

Please sign in to comment.