Aaron Pham
2024-02-06 d2fb50b83c9557f1cd36e4706e9a11aa8f01e458
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))
  }
}