From 8df74185e92d3b59c064bf89d167ca9e004e1e8c Mon Sep 17 00:00:00 2001 From: Aaron Pham <29749331+aarnphm@users.noreply.github.com> Date: Tue, 30 Jan 2024 00:55:10 -0500 Subject: [PATCH] fix(type): annotate event for nav (#761) Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com> --- quartz/components/scripts/graph.inline.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quartz/components/scripts/graph.inline.ts b/quartz/components/scripts/graph.inline.ts index bddcfa4..a76409c 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)