Skip to content

Commit 207de0c

Browse files
committed
fix: fix version switch
1 parent 7b292c9 commit 207de0c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/.vitepress/theme/versioning/VersionSwitcher.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const isLatest = ref(true);
2020
function refresh() {
2121
let version = latestVersion.value;
2222
let refreshPage = false;
23+
isLatest.value = true;
2324
2425
for (const v of versionList) {
2526
if (window.location.pathname.startsWith(`/${v}/`)) {
@@ -41,7 +42,7 @@ function refresh() {
4142
}
4243
4344
async function init() {
44-
const versionDataFileUrl = `${window.location.origin}/9.4.2/versions.yml`;
45+
const versionDataFileUrl = `${window.location.origin}/versions.yml`;
4546
const versionDataFileContent = await (await fetch(versionDataFileUrl)).text();
4647
const versionData = parse(versionDataFileContent);
4748
versionList = versionData.versions;

0 commit comments

Comments
 (0)