Skip to content

Commit

Permalink
Fixed bug TwoStoryRobot#4
Browse files Browse the repository at this point in the history
Id field is compared by value.
  • Loading branch information
RoranDangerous authored Oct 27, 2018
1 parent 8a335d4 commit 0aa22fb
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 0aa22fb

Please sign in to comment.