Jacky Zhao
2024-02-02 18745a9dc68d26827ea0df99dcc709e311c74a98
quartz/components/scripts/toc.inline.ts
@@ -29,8 +29,8 @@
    const content = toc.nextElementSibling as HTMLElement | undefined
    if (!content) return
    content.style.maxHeight = collapsed ? "0px" : content.scrollHeight + "px"
    toc.removeEventListener("click", toggleToc)
    toc.addEventListener("click", toggleToc)
    window.addCleanup(() => toc.removeEventListener("click", toggleToc))
  }
}