Skip to content

Commit cfbca4b

Browse files
committed
list bug fix
1 parent fdea9a6 commit cfbca4b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

browser/main/HomePage/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ function remap (state) {
143143
let modified = _articles != null ? _articles.modified : []
144144

145145
articles.sort((a, b) => {
146-
return new Date(b.updatedAt) - new Date(a.updatedAt)
146+
let match = new Date(b.updatedAt) - new Date(a.updatedAt)
147+
if (match === 0) match = new Date(b.createdAt) - new Date(a.createdAt)
148+
if (match === 0) match = b.title.compare(a.title)
149+
if (match === 0) match = b.key.compare(a.key)
150+
return match
147151
})
148152
let allArticles = articles.slice()
149153

0 commit comments

Comments
 (0)