diff --git a/client/src/components/Minimap/Minimap.tsx b/client/src/components/Minimap/Minimap.tsx index 921d83a56b..159bb7ae58 100644 --- a/client/src/components/Minimap/Minimap.tsx +++ b/client/src/components/Minimap/Minimap.tsx @@ -38,8 +38,9 @@ const mapIntersections = ( acc: LinkIntersections, { target, isIntersecting }: IntersectionObserverEntry, ) => { - const href = `#${target.closest('[data-panel]')?.id}` || ''; - acc[href] = isIntersecting; + const id = target.closest('[data-panel]')?.id; + if (!id) return acc; + acc[`#${id}`] = isIntersecting; return acc; };