Skip to content

Commit

Permalink
fix(search): don't directly access userConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Apr 16, 2023
1 parent 7c34f6a commit 3e0e9d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node/plugins/localSearchPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
)

Expand Down

0 comments on commit 3e0e9d2

Please sign in to comment.