diff --git a/src/shared/shared.ts b/src/shared/shared.ts index bdfe89f64716..f42a0f966009 100644 --- a/src/shared/shared.ts +++ b/src/shared/shared.ts @@ -37,10 +37,10 @@ function resolveLocales( } export function createLangDictionary(siteData: { - themeConfig?: any + themeConfig?: Record locales?: Record }) { - const { locales } = siteData.themeConfig + const { locales } = siteData.themeConfig || {} const siteLocales = siteData.locales return locales && siteLocales ? Object.keys(locales).reduce((langs, path) => {