fix: maybeDates will change children dates

This commit is contained in:
Yes365 2025-03-16 16:41:19 +08:00 committed by GitHub
parent fbb4523853
commit 0db610aac9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,7 +71,10 @@ export default ((opts?: Partial<FolderContentOptions>) => {
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