fix: ensure folder sorting respects placeholder creation time
This commit is contained in:
1 parent
4239120895
commit
49d795093e
1 file changed
+3
-5
@@ -576,11 +576,9 @@ function App() {
|
||||
files,
|
||||
fileCount: realFiles.length,
|
||||
coverFile,
|
||||
latestDate: realFiles.length > 0
|
||||
? realFiles.reduce((latest, file) => {
|
||||
return !latest || new Date(file.created_at) > new Date(latest) ? file.created_at : latest;
|
||||
}, '')
|
||||
: files[0].created_at // 如果全是占位文件,用占位文件的日期
|
||||
latestDate: files.reduce((latest, file) => {
|
||||
return !latest || new Date(file.created_at) > new Date(latest) ? file.created_at : latest;
|
||||
}, '')
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user