From 0db610aac97e14afec9d5bb2f1019e376e814ab3 Mon Sep 17 00:00:00 2001 From: Yes365 Date: Sun, 16 Mar 2025 16:41:19 +0800 Subject: [PATCH] fix: maybeDates will change children dates --- quartz/components/pages/FolderContent.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quartz/components/pages/FolderContent.tsx b/quartz/components/pages/FolderContent.tsx index e77565312..204b8de14 100644 --- a/quartz/components/pages/FolderContent.tsx +++ b/quartz/components/pages/FolderContent.tsx @@ -71,7 +71,10 @@ export default ((opts?: Partial) => { if (child.data?.dates) { // compare all dates and assign to maybeDates if its more recent or its not set if (!maybeDates) { - maybeDates = child.data.dates + const childDates = child.data.dates; + maybeDates = { + ...childDates + } } else { if (child.data.dates.created > maybeDates.created) { maybeDates.created = child.data.dates.created