fix(anchor): active anchor error (#47795)

pull/47807/head
winches 11 months ago committed by GitHub
parent f8532c1163
commit 3818c10912
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -199,7 +199,7 @@ const Anchor: React.FC<AnchorProps> = (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 });
}
}

Loading…
Cancel
Save