Skip to content

Commit

Permalink
Revert to default to {} in useLogo approach
Browse files Browse the repository at this point in the history
  • Loading branch information
SamChou19815 committed Oct 19, 2020
1 parent 89a5131 commit bf593e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import useThemeConfig from '../../utils/useThemeConfig';

const useLogo = (): useLogoReturns => {
const {
navbar: {logo},
navbar: {logo = {}},
} = useThemeConfig();
const {isDarkTheme} = useThemeContext();
const logoLink = useBaseUrl(logo.href || '/');
Expand Down
3 changes: 1 addition & 2 deletions packages/docusaurus-theme-classic/src/validateThemeConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const DEFAULT_CONFIG = {
navbar: {
hideOnScroll: false,
items: [],
logo: {},
},
};
exports.DEFAULT_CONFIG = DEFAULT_CONFIG;
Expand Down Expand Up @@ -249,7 +248,7 @@ const ThemeConfigSchema = Joi.object({
srcDark: Joi.string(),
href: Joi.string(),
target: Joi.string(),
}).default({}),
}),
}).default(DEFAULT_CONFIG.navbar),
footer: Joi.object({
style: Joi.string().equal('dark', 'light').default('light'),
Expand Down

0 comments on commit bf593e0

Please sign in to comment.