Skip to content

Commit afbe439

Browse files
AlexGarrityRokt33r
authored andcommitted
Reverse notes after filtering
1 parent d706a53 commit afbe439

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

browser/main/NoteList/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,12 +1144,12 @@ class NoteList extends React.Component {
11441144
const sortedNotes = location.pathname.match(/\/starred|\/trash/)
11451145
? this.getNotes().sort(sortFunc)
11461146
: this.sortByPin(this.getNotes().sort(sortFunc))
1147-
if (sortDir === 'DESCENDING') sortedNotes.reverse()
11481147
this.notes = notes = sortedNotes.filter(note => {
11491148
// this is for the trash box
11501149
if (note.isTrashed !== true || location.pathname === '/trashed')
11511150
return true
11521151
})
1152+
if (sortDir === 'DESCENDING') this.notes.reverse()
11531153

11541154
moment.updateLocale('en', {
11551155
relativeTime: {

0 commit comments

Comments
 (0)