From 516d9a27e7e2c08efdf24857b03f1831dbaf7da7 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Sat, 18 Nov 2023 18:27:44 -0800 Subject: [PATCH] fix: explicit undefined check in header transclude --- quartz/components/renderPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quartz/components/renderPage.tsx b/quartz/components/renderPage.tsx index 36b0646..5cb39d9 100644 --- a/quartz/components/renderPage.tsx +++ b/quartz/components/renderPage.tsx @@ -104,7 +104,7 @@ export function renderPage( break } - if (startIdx) { + if (startIdx !== undefined) { endIdx = i } else if (el.properties?.id === blockRef) { startIdx = i @@ -112,7 +112,7 @@ export function renderPage( } } - if (!startIdx) { + if (startIdx === undefined) { return }