We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fdea9a6 commit cfbca4bCopy full SHA for cfbca4b
1 file changed
browser/main/HomePage/index.js
@@ -143,7 +143,11 @@ function remap (state) {
143
let modified = _articles != null ? _articles.modified : []
144
145
articles.sort((a, b) => {
146
- return new Date(b.updatedAt) - new Date(a.updatedAt)
+ 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
151
})
152
let allArticles = articles.slice()
153
0 commit comments