Skip to content

Commit

Permalink
Merge pull request #18 from RoranDangerous/patch-1
Browse files Browse the repository at this point in the history
Fixed bug #4: id field is compared by value.
  • Loading branch information
jonotron authored Oct 27, 2018
2 parents 87d0470 + 0aa22fb commit b5cdcb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion react-search-lunr.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ReactLunr extends React.Component {
.search(filter) // search the index
.map(({ ref, ...rest }) => ({
ref,
item: this.state.documents.find(m => m.id === ref),
item: this.state.documents.find(m => m.id == ref),
...rest
})) // attach each item
return results
Expand Down

0 comments on commit b5cdcb6

Please sign in to comment.