We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 42530e1 commit 2a93bf0Copy full SHA for 2a93bf0
src/components/sidebarTableOfContents/index.tsx
@@ -184,7 +184,7 @@ export function SidebarTableOfContents() {
184
}, observerOptions);
185
const headings = tocItems.map(item => item.element);
186
headings.forEach(heading => observer.observe(heading));
187
- return () => headings.forEach(heading => observer.unobserve(heading));
+ return () => observer.disconnect();
188
}, [tocItems]);
189
190
return (
0 commit comments