Jacky Zhao
2024-05-29 73a5ec87f135b72e8f99c0e08ca867b03803c5cd
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))
  }
}