1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

list bug fix

This commit is contained in:
Rokt33r
2016-01-04 16:38:24 +09:00
parent fdea9a68a1
commit cfbca4b0fd

View File

@@ -143,7 +143,11 @@ function remap (state) {
let modified = _articles != null ? _articles.modified : []
articles.sort((a, b) => {
return new Date(b.updatedAt) - new Date(a.updatedAt)
let match = new Date(b.updatedAt) - new Date(a.updatedAt)
if (match === 0) match = new Date(b.createdAt) - new Date(a.createdAt)
if (match === 0) match = b.title.compare(a.title)
if (match === 0) match = b.key.compare(a.key)
return match
})
let allArticles = articles.slice()