Access id instead of item.id since Fuse has flattened its object structure

This commit is contained in:
Jay Kid 2017-09-21 20:55:11 +02:00
parent 4c080cdc06
commit 509eed587c
2 changed files with 2 additions and 2 deletions

View file

@ -71,7 +71,7 @@ const choices = (state = [], action) => {
// Set active state based on whether choice is // Set active state based on whether choice is
// within filtered results // within filtered results
choice.active = filteredResults.some((result) => { choice.active = filteredResults.some((result) => {
if (result.item.id === choice.id) { if (result.id === choice.id) {
choice.score = result.score; choice.score = result.score;
return true; return true;
} }

View file

@ -66,7 +66,7 @@
}, },
"dependencies": { "dependencies": {
"classnames": "^2.2.5", "classnames": "^2.2.5",
"fuse.js": "^2.2.2", "fuse.js": "^3.1.0",
"redux": "^3.3.1" "redux": "^3.3.1"
}, },
"npmName": "choices.js", "npmName": "choices.js",