Jacky Zhao
2024-02-02 0a3379a8530f365e2bd85e8ea20a1dfc8126c39c
quartz/components/scripts/graph.inline.ts
@@ -319,12 +319,12 @@
  registerEscapeHandler(container, hideGlobalGraph)
}
document.addEventListener("nav", async (e: unknown) => {
  const slug = (e as CustomEventMap["nav"]).detail.url
document.addEventListener("nav", async (e: CustomEventMap["nav"]) => {
  const slug = e.detail.url
  addToVisited(slug)
  await renderGraph("graph-container", slug)
  const containerIcon = document.getElementById("global-graph-icon")
  containerIcon?.removeEventListener("click", renderGlobalGraph)
  containerIcon?.addEventListener("click", renderGlobalGraph)
  window.addCleanup(() => containerIcon?.removeEventListener("click", renderGlobalGraph))
})