diff --git a/packages/docusaurus-theme-classic/src/theme/Navbar/index.js b/packages/docusaurus-theme-classic/src/theme/Navbar/index.js index cdc4f9946595..3ccff29f9d3c 100644 --- a/packages/docusaurus-theme-classic/src/theme/Navbar/index.js +++ b/packages/docusaurus-theme-classic/src/theme/Navbar/index.js @@ -51,8 +51,7 @@ function NavLink({activeBasePath, to, href, label, position, ...props}) { } function Navbar() { - const context = useDocusaurusContext(); - const {siteConfig = {}} = context; + const {siteConfig = {}, isClient} = useDocusaurusContext(); const {baseUrl, themeConfig = {}} = siteConfig; const {navbar = {}, disableDarkMode = false} = themeConfig; const {title, logo = {}, links = [], hideOnScroll = false} = navbar; @@ -124,7 +123,12 @@ function Navbar() { {logo != null && ( - {logo.alt} + {logo.alt} )} {title != null && ( {logo != null && ( - {logo.alt} + {logo.alt} )} {title != null && {title}}