fix: maybeDates will change children dates (#1843)
Some checks are pending
Build and Test / build-and-test (macos-latest) (push) Waiting to run
Build and Test / build-and-test (windows-latest) (push) Waiting to run
Build and Test / build-and-test (ubuntu-latest) (push) Has been skipped
Build and Test / publish-tag (push) Has been skipped

This commit is contained in:
Yes365 2025-03-17 23:27:15 +08:00 committed by GitHub
parent e86544064c
commit c0b73ddaa4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,7 +71,7 @@ export default ((opts?: Partial<FolderContentOptions>) => {
if (child.data?.dates) { if (child.data?.dates) {
// compare all dates and assign to maybeDates if its more recent or its not set // compare all dates and assign to maybeDates if its more recent or its not set
if (!maybeDates) { if (!maybeDates) {
maybeDates = child.data.dates maybeDates = { ...child.data.dates }
} else { } else {
if (child.data.dates.created > maybeDates.created) { if (child.data.dates.created > maybeDates.created) {
maybeDates.created = child.data.dates.created maybeDates.created = child.data.dates.created