diff --git a/themes/medium/components/TopNavBar.js b/themes/medium/components/TopNavBar.js index 7dd9433f..4835df81 100644 --- a/themes/medium/components/TopNavBar.js +++ b/themes/medium/components/TopNavBar.js @@ -55,7 +55,7 @@ export default function TopNavBar(props) { {/* 顶部菜单 */}
{navs && navs.map(link => { - if (link.show) { + if (link?.show) { const selected = (router.pathname === link.to) || (router.asPath === link.to) return