Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Dec 7, 2023
1 parent 4924cd7 commit 60a04cf
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions packages/docusaurus/src/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,20 @@ export async function findThemeConfigPath(
);
}
return customThemeConfigPath;
}
const conventionalThemeConfigPath = await findConventionalThemeConfigPath(
siteDir,
}
const conventionalThemeConfigPath = await findConventionalThemeConfigPath(
siteDir,
);
// In Docusaurus v3 we require users to provide either the theme config
// through the conventional path, or through the legacy siteConfig attribute
// To avoid issues we prevent users to not provide any theme config at all
if (
!conventionalThemeConfigPath &&
Object.keys(siteConfig.themeConfig ?? {}).length === 0
) {
throw new Error(
`Theme config file couldn't be found at ${DEFAULT_THEME_FILE_NAME}.js or ${DEFAULT_THEME_FILE_NAME}.tsx`,
);
// In Docusaurus v3 we require users to provide either the theme config
// through the conventional path, or through the legacy siteConfig attribute
// To avoid issues we prevent users to not provide any theme config at all
if (
!conventionalThemeConfigPath &&
Object.keys(siteConfig.themeConfig ?? {}).length
) {
throw new Error(
`Theme config file couldn't be found at ${DEFAULT_THEME_FILE_NAME}.js or ${DEFAULT_THEME_FILE_NAME}.tsx`,
);
}
return conventionalThemeConfigPath;

}
return conventionalThemeConfigPath;
}

0 comments on commit 60a04cf

Please sign in to comment.