diff --git a/src/components/navigation/sidebars/nav/index.tsx b/src/components/navigation/sidebars/nav/index.tsx index 8ba78de..ec53192 100644 --- a/src/components/navigation/sidebars/nav/index.tsx +++ b/src/components/navigation/sidebars/nav/index.tsx @@ -47,10 +47,9 @@ const NavComponent: Component = props => { } }; - onMount(() => { - onCleanup(() => { - window.removeEventListener("click", handleClickOutside); - }); + onMount(() => {}); + onCleanup(() => { + window.removeEventListener("click", handleClickOutside); }); createEffect(() => { diff --git a/src/components/navigation/sidebars/toc/index.tsx b/src/components/navigation/sidebars/toc/index.tsx index 64eb910..5b07481 100644 --- a/src/components/navigation/sidebars/toc/index.tsx +++ b/src/components/navigation/sidebars/toc/index.tsx @@ -40,10 +40,9 @@ const TableOfContents: Component = props => { } }; - onMount(() => { - onCleanup(() => { - window.removeEventListener("click", handleClickOutside); - }); + onMount(() => {}); + onCleanup(() => { + window.removeEventListener("click", handleClickOutside); }); createEffect(() => {