fix(search): don't directly access userConfig

pull/2241/head
Divyansh Singh 2 years ago
parent 7c34f6a3d9
commit 3e0e9d2b27

@ -22,7 +22,7 @@ interface IndexObject {
export async function localSearchPlugin(
siteConfig: SiteConfig
): Promise<Plugin> {
if (siteConfig.userConfig.themeConfig?.search?.provider !== 'local') {
if (siteConfig.site.themeConfig?.search?.provider !== 'local') {
return {
name: 'vitepress:local-search',
resolveId(id) {
@ -40,8 +40,8 @@ export async function localSearchPlugin(
const md = await createMarkdownRenderer(
siteConfig.srcDir,
siteConfig.userConfig.markdown,
siteConfig.userConfig.base,
siteConfig.markdown,
siteConfig.site.base,
siteConfig.logger
)

Loading…
Cancel
Save