fix: maybeDates will change children dates (#1843)
This commit is contained in:
parent
e86544064c
commit
c0b73ddaa4
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue