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 3985715 commit fbce33bCopy full SHA for fbce33b
docs/.vitepress/theme/versioning/VersionSwitcher.vue
@@ -24,19 +24,21 @@ function refresh() {
24
25
for (const v of versionList) {
26
if (window.location.pathname.startsWith(`/${v}/`)) {
27
- if (currentVersion.value !== '' && v !== currentVersion.value) {
28
- refreshPage = true;
29
- }
30
version = v;
31
isLatest.value = false;
32
break;
33
}
34
35
+ if (currentVersion.value !== version) {
+ refreshPage = true;
+ }
36
+
37
currentVersion.value = version;
38
versions.value = versionList;
39
40
if (refreshPage) {
41
+ window.location.pathname = isLatest.value ? '/' : `/${version}/`;
42
window.location.reload();
43
44
0 commit comments