Jacky Zhao
2024-02-11 ab0e20b4d0ad1e650126ffd0afa7d0ed6bd46da2
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))
})