mirror of
https://github.com/comatory/fb2iCal
synced 2025-06-05 22:09:25 +02:00
sort table rows by createdAt record property instead of IDs
This commit is contained in:
@@ -174,10 +174,12 @@
|
||||
|
||||
storageContents
|
||||
.sort((a, b) => {
|
||||
if (a.id < b.id) {
|
||||
const aDate = new Date(a.createdAt)
|
||||
const bDate = new Date(b.createdAt)
|
||||
if (aDate < bDate) {
|
||||
return -1
|
||||
}
|
||||
if (a.id > b.id) {
|
||||
if (aDate > bDate) {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
|
Reference in New Issue
Block a user