From 3ce6aa49bf25b26a4cb1bf18e9770271d132772d Mon Sep 17 00:00:00 2001
From: Karim <46734059+h-karim@users.noreply.github.com>
Date: Fri, 21 Mar 2025 23:49:56 +0000
Subject: [PATCH] fix(ogImage): update socialImage path to include base URL if defined (#1858)
---
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