From 6783edec08ac3468eb651e9e3c22cb11fd0c45cb Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Wed, 12 Jan 2022 08:55:41 +0800 Subject: [PATCH] bugfix: toc --- pages/article/[slug].js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/article/[slug].js b/pages/article/[slug].js index 50fbf3f1..d07466ae 100644 --- a/pages/article/[slug].js +++ b/pages/article/[slug].js @@ -37,7 +37,7 @@ const Slug = ({ const drawerRight = useRef(null) const targetRef = typeof window !== 'undefined' ? document.getElementById('container') : null - const floatSlot = post?.toc.length > 1 ?
{ drawerRight?.current?.handleSwitchVisible() }} />
: null + const floatSlot = post?.toc?.length > 1 ?
{ drawerRight?.current?.handleSwitchVisible() }} />
: null return (