We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 603e8a0 commit 93a0333Copy full SHA for 93a0333
guide/theme/lang_toggle.js
@@ -41,10 +41,13 @@
41
if (idx === -1) {
42
// Fallback: If "book/" isn’t in the path
43
// Just go to the top-level file in the chosen language.
44
+ let newPath = '';
45
if (chosenLang === 'en')
- window.location.href = 'index.html';
46
+ newPath = 'index.html';
47
else
- window.location.href = chosenLang + '/index.html';
48
+ newPath = chosenLang + '/index.html';
49
+
50
+ window.location.href = window.location.hostname + '/' + newPath;
51
52
return;
53
}
0 commit comments