Skip to content

Commit

Permalink
chore: fix api usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Nov 22, 2023
1 parent 2d09223 commit 2629c5b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ecosystem/theme-default/src/client/components/NavbarItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import AutoLink from '@theme/AutoLink.vue'
import NavbarDropdown from '@theme/NavbarDropdown.vue'
import {
getPagesPath,
useRouteLocale,
useSiteData,
useSiteLocaleData,
Expand Down Expand Up @@ -71,9 +72,7 @@ const useNavbarSelectLanguage = (): ComputedRef<ResolvedNavbarItem[]> => {
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 {
Expand Down

0 comments on commit 2629c5b

Please sign in to comment.