From 2629c5b24b4dd2cde913cae8e1757ee7cfc80c21 Mon Sep 17 00:00:00 2001 From: "Mr.Hope" Date: Wed, 22 Nov 2023 20:59:44 +0800 Subject: [PATCH] chore: fix api usage --- .../theme-default/src/client/components/NavbarItems.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ecosystem/theme-default/src/client/components/NavbarItems.vue b/ecosystem/theme-default/src/client/components/NavbarItems.vue index 5965ee5f85..7f96d5e6f8 100644 --- a/ecosystem/theme-default/src/client/components/NavbarItems.vue +++ b/ecosystem/theme-default/src/client/components/NavbarItems.vue @@ -2,6 +2,7 @@ import AutoLink from '@theme/AutoLink.vue' import NavbarDropdown from '@theme/NavbarDropdown.vue' import { + getPagesPath, useRouteLocale, useSiteData, useSiteLocaleData, @@ -71,9 +72,7 @@ const useNavbarSelectLanguage = (): ComputedRef => { routeLocale.value, targetLocalePath, ) - if ( - router.getRoutes().some((item) => item.path === targetLocalePage) - ) { + if (getPagesPath().some((path) => path === targetLocalePage)) { // try to keep current hash and params across languages link = currentFullPath.replace(currentPath, targetLocalePage) } else {