From 696403d3fa79f79fa3340bb1fe11533d1fdaf0a4 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 13 Mar 2025 17:55:37 +0000
Subject: [PATCH] chore: bump version to 4.4.1

---
 quartz/components/scripts/callout.inline.ts |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/quartz/components/scripts/callout.inline.ts b/quartz/components/scripts/callout.inline.ts
index 8f63df3..3b7e16d 100644
--- a/quartz/components/scripts/callout.inline.ts
+++ b/quartz/components/scripts/callout.inline.ts
@@ -28,17 +28,15 @@
   ) as HTMLCollectionOf<HTMLElement>
   for (const div of collapsible) {
     const title = div.firstElementChild
+    if (!title) continue
 
-    if (title) {
-      title.addEventListener("click", toggleCallout)
-      window.addCleanup(() => title.removeEventListener("click", toggleCallout))
+    title.addEventListener("click", toggleCallout)
+    window.addCleanup(() => title.removeEventListener("click", toggleCallout))
 
-      const collapsed = div.classList.contains("is-collapsed")
-      const height = collapsed ? title.scrollHeight : div.scrollHeight
-      div.style.maxHeight = height + "px"
-    }
+    const collapsed = div.classList.contains("is-collapsed")
+    const height = collapsed ? title.scrollHeight : div.scrollHeight
+    div.style.maxHeight = height + "px"
   }
 }
 
 document.addEventListener("nav", setupCallout)
-window.addEventListener("resize", setupCallout)

--
Gitblit v1.10.0