diff --git a/v3-docs/docs/.vitepress/theme/Layout.vue b/v3-docs/docs/.vitepress/theme/Layout.vue index e240ef669f..0c1de9f573 100644 --- a/v3-docs/docs/.vitepress/theme/Layout.vue +++ b/v3-docs/docs/.vitepress/theme/Layout.vue @@ -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 } from 'vue' +import { nextTick, onMounted, provide, ref } from 'vue' import { redirect } from './redirects/script'; const { isDark } = useData() const router = useRouter() @@ -50,7 +50,13 @@ provide('toggle-appearance', async ({ clientX: x, clientY: y }: MouseEvent) => { ) }) -const inLatestDeployedDoc = () => isClient && window.location.href.startsWith("https://docs.meteor.com/") + +const shouldShowGoToLatest = ref(false); + +onMounted(() => { + shouldShowGoToLatest.value = isClient && window.location.href.startsWith("https://docs.meteor.com/") +}); +