diff --git a/browser/main/NoteList/index.js b/browser/main/NoteList/index.js index 9b4b2a91..c9e116d7 100644 --- a/browser/main/NoteList/index.js +++ b/browser/main/NoteList/index.js @@ -285,11 +285,18 @@ class NoteList extends React.Component { } sortByPin (unorderedNotes) { - const pinnedNotes = unorderedNotes.filter((note) => { - return note.isPinned + const pinnedNotes = [] + const unpinnedNotes = [] + + unorderedNotes.forEach((note) => { + if (note.isPinned) { + pinnedNotes.push(note) + } else { + unpinnedNotes.push(note) + } }) - return pinnedNotes.concat(unorderedNotes) + return pinnedNotes.concat(unpinnedNotes) } handleNoteClick (e, uniqueKey) {