diff --git a/browser/lib/search.js b/browser/lib/search.js index f119421b..1914bb81 100644 --- a/browser/lib/search.js +++ b/browser/lib/search.js @@ -1,7 +1,6 @@ import _ from 'lodash' -export default function searchFromNotes (data, search) { - let notes = data.noteMap.map((note) => note) +export default function searchFromNotes (notes, search) { if (search.trim().length === 0) return [] let searchBlocks = search.split(' ') searchBlocks.forEach((block) => { diff --git a/browser/main/NoteList/index.js b/browser/main/NoteList/index.js index bac7767d..9c0b3c2d 100644 --- a/browser/main/NoteList/index.js +++ b/browser/main/NoteList/index.js @@ -246,7 +246,7 @@ class NoteList extends React.Component { if (searchInputText === '') { router.push('/home') } - return searchFromNotes(this.props.data, searchInputText) + return searchFromNotes(this.notes, searchInputText) } if (location.pathname.match(/\/trashed/)) {