diff --git a/components/anchor/Anchor.tsx b/components/anchor/Anchor.tsx index 028713eabd..03fb706f2a 100644 --- a/components/anchor/Anchor.tsx +++ b/components/anchor/Anchor.tsx @@ -199,7 +199,7 @@ const Anchor: React.FC = (props) => { const target = document.getElementById(sharpLinkMatch[1]); if (target) { const top = getOffsetTop(target, container); - if (top < _offsetTop + _bounds) { + if (top <= _offsetTop + _bounds) { linkSections.push({ link, top }); } }