Merge pull request #13487 from meteor/docs/revert-if-check-and-move-on-mounted-back

DOCS: flip the if check and move on if mounted back
This commit is contained in:
Gabriel Grubba
2024-11-22 09:08:15 -03:00
committed by GitHub
3 changed files with 11 additions and 7 deletions

View File

@@ -3,7 +3,7 @@ import NotFound from './NotFound.vue'
import GoToLatest from './GoToLatest.vue'
import { useData, useRouter } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import { nextTick, provide, ref, onBeforeMount } from 'vue'
import { nextTick, provide, ref, onMounted } from 'vue'
import { redirect } from './redirects/script';
const { isDark } = useData()
const router = useRouter()
@@ -51,9 +51,9 @@ provide('toggle-appearance', async ({ clientX: x, clientY: y }: MouseEvent) => {
})
const isLatestVersion = ref(false);
const isLatestVersion = ref(true);
onBeforeMount(() => {
onMounted(() => {
isLatestVersion.value = isClient && window.location.href.startsWith("https://docs.meteor.com/")
});

View File

@@ -1,7 +1,7 @@
---
meteor_version: 3.0.4
node_version: 20.18.0
npm_version: 10.8.2
meteor_version: 3.1.0
node_version: 22.11.0
npm_version: 10.9.0
---
# Meteor 3.0 Migration Guide

View File

@@ -9,7 +9,11 @@ const meteorToolLink =
const getMeteorVersionFromDevel = async () => {
const response = await fetch(meteorToolLink);
const text = await response.text();
const version = text.match(/version: '(.*)'/)[1];
const version = text
.match(/version: (.*)/)[1]
.replaceAll("'", "")
.replaceAll('"', "")
.replaceAll(",", "");
return version;
};