From e7038de49d282504711af6b7cc1b218291d522e6 Mon Sep 17 00:00:00 2001 From: Gabriel Grubba Date: Thu, 21 Nov 2024 19:28:34 -0300 Subject: [PATCH] DOCS: solve flicker issue --- v3-docs/docs/.vitepress/theme/Layout.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v3-docs/docs/.vitepress/theme/Layout.vue b/v3-docs/docs/.vitepress/theme/Layout.vue index 6071c76dea..b2f5460b04 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, onMounted, provide, ref } from 'vue' +import { nextTick, provide, ref, onBeforeMount } from 'vue' import { redirect } from './redirects/script'; const { isDark } = useData() const router = useRouter() @@ -53,7 +53,7 @@ provide('toggle-appearance', async ({ clientX: x, clientY: y }: MouseEvent) => { const isLatestVersion = ref(false); -onMounted(() => { +onBeforeMount(() => { isLatestVersion.value = isClient && window.location.href.startsWith("https://docs.meteor.com/") });