From 3818c109127ef832a6b5c677d7db49a4993b1da4 Mon Sep 17 00:00:00 2001 From: winches <96854855+winchesHe@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:42:45 +0800 Subject: [PATCH] fix(anchor): active anchor error (#47795) --- components/anchor/Anchor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }); } }