Skip to content

Commit

Permalink
refactor: preview version code
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Aug 5, 2021
1 parent dd8cfbc commit d63e905
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/client/app/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ export function initData(route: Route): VitePressData {
frontmatter: computed(() => route.data.frontmatter),
lang: computed(() => site.value.lang),
localePath: computed(() => {
const { langs } = site.value
const path = Object.keys(langs).find(
(lp) => langs[lp].lang === site.value.lang
)
const { langs, lang } = site.value
const path = Object.keys(langs).find((lp) => langs[lp].lang === lang)
return withBase(path || '/')
}),
title: computed(() => {
Expand Down

0 comments on commit d63e905

Please sign in to comment.