From edefeb80338fc4bebd3aad0c050a803d23ec5a3f Mon Sep 17 00:00:00 2001 From: zonemeen Date: Thu, 11 Jan 2024 20:15:28 +0800 Subject: [PATCH] fix --- src/node/plugins/localSearchPlugin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/plugins/localSearchPlugin.ts b/src/node/plugins/localSearchPlugin.ts index 76faf941..ee36e42f 100644 --- a/src/node/plugins/localSearchPlugin.ts +++ b/src/node/plugins/localSearchPlugin.ts @@ -150,8 +150,8 @@ export async function localSearchPlugin( const locale = getLocaleForPath(file) const index = getIndexByLocale(locale) const sidebar = getSidebar( - siteConfig.site?.locales[locale].themeConfig?.sidebar ?? - siteConfig.site.themeConfig.sidebar, + siteConfig.site?.locales[locale]?.themeConfig?.sidebar ?? + siteConfig.site?.themeConfig.sidebar, fileId ) const parentTitles = getParentTitles(sidebar, fileId)