Skip to content

Commit

Permalink
Fix a bug in version selector
Browse files Browse the repository at this point in the history
  • Loading branch information
kwankyu committed Jul 21, 2024
1 parent b6c1456 commit eae1b8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/doc/common/static/jupyter-sphinx-furo.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ function changeVersion() {
if (selected_url) {
if (window.location.protocol == 'file:') {
let pathname = window.location.pathname;
let cutoff_point = pathname.indexOf('doc/sage');
let cutoff_point = pathname.indexOf('/html');
if (cutoff_point !== -1) {
pathname = pathname.substring(cutoff_point + 8);
pathname = pathname.substring(cutoff_point);
window.location.href = selected_url + pathname;
} else {
window.location.href = selected_url + 'html/en/index.html';
window.location.href = selected_url + '/index.html';
}
} else {
window.location.href = selected_url + window.location.pathname;
Expand Down

0 comments on commit eae1b8b

Please sign in to comment.