Skip to content

Commit 5fdd374

Browse files
committed
fix: properly override localeIndex property on resolved siteData
1 parent aa29aad commit 5fdd374

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/shared/shared.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export function resolveSiteDataByRoute(
9797
): SiteData {
9898
const localeIndex = getLocaleForPath(siteData, relativePath)
9999
const { label, link, ...localeConfig } = siteData.locales[localeIndex] ?? {}
100+
Object.assign(localeConfig, { localeIndex })
100101
const additionalConfigs = resolveAdditionalConfig(siteData, relativePath)
101102
if (inBrowser && (import.meta as any).env?.DEV) {
102103
;(localeConfig as any)[VP_SOURCE_KEY] = `locale config (${localeIndex})`

0 commit comments

Comments
 (0)