diff --git a/themes/matery/LayoutSlug.js b/themes/matery/LayoutSlug.js index 85ef4ced..0d872286 100644 --- a/themes/matery/LayoutSlug.js +++ b/themes/matery/LayoutSlug.js @@ -17,7 +17,7 @@ export const LayoutSlug = props => { const scrollListener = () => { const scrollY = window.pageYOffset - const shouldShow = scrollY > 220 + const shouldShow = scrollY > 220 && post?.toc?.length > 0 if (shouldShow !== show) { switchShow(shouldShow) @@ -46,7 +46,7 @@ export const LayoutSlug = props => { >
-
+
{lock && }