diff --git a/quartz/components/scripts/graph.inline.ts b/quartz/components/scripts/graph.inline.ts index bddcfa4c6..a76409c13 100644 --- a/quartz/components/scripts/graph.inline.ts +++ b/quartz/components/scripts/graph.inline.ts @@ -319,8 +319,8 @@ function renderGlobalGraph() { 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)