mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
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:
@@ -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/")
|
||||
});
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user