From 9576701d8532b9697df62c96d7c8676afd985b2d Mon Sep 17 00:00:00 2001
From: Andrew G. Dunn <andrew@dunn.dev>
Date: Mon, 02 Mar 2026 16:31:53 +0000
Subject: [PATCH] fix: await micromorph() to prevent race condition with nav event handlers (#2323)

---
 quartz/components/scripts/explorer.inline.ts |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/quartz/components/scripts/explorer.inline.ts b/quartz/components/scripts/explorer.inline.ts
index 9c83411..3c6851c 100644
--- a/quartz/components/scripts/explorer.inline.ts
+++ b/quartz/components/scripts/explorer.inline.ts
@@ -111,6 +111,10 @@
   const folderPath = node.slug
   folderContainer.dataset.folderpath = folderPath
 
+  if (currentSlug === folderPath) {
+    folderContainer.classList.add("active")
+  }
+
   if (opts.folderClickBehavior === "link") {
     // Replace button with link for link behavior
     const button = titleContainer.querySelector(".folder-button") as HTMLElement

--
Gitblit v1.10.0