We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 71969b4 commit cc00018Copy full SHA for cc00018
1 file changed
docs/.vitepress/theme/versioning/VersionSwitcher.vue
@@ -18,16 +18,24 @@ const versions = ref<string[]>([]);
18
19
function refresh() {
20
let version = latestVersion.value;
21
+ let refreshPage = false;
22
23
for (const v of versionList) {
24
if (window.location.pathname.startsWith(`/${v}/`)) {
25
+ if(currentVersion.value !== '' && v !== currentVersion.value) {
26
+ refreshPage = true;
27
+ }
28
version = v;
29
break;
30
}
31
32
33
currentVersion.value = version;
34
versions.value = versionList;
35
+
36
+ if(refreshPage) {
37
+ window.location.reload();
38
39
40
41
async function init() {
0 commit comments