From e76aa37d9f7dfd65432ea4b7cf2ac07d409e7531 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Wed, 7 Dec 2022 22:39:29 +0800 Subject: [PATCH] fix link null --- themes/medium/components/TopNavBar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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