Use Array.prototype.some instead of filter
then length
This commit is contained in:
parent
88eb72468e
commit
749e1e44b9
@ -133,8 +133,7 @@ export default class List extends Component {
|
||||
return searchValues
|
||||
.map(searchValue => {
|
||||
return values
|
||||
.filter(value => value.indexOf(searchValue) >= 0)
|
||||
.length > 0;
|
||||
.some(value => value.indexOf(searchValue) >= 0);
|
||||
})
|
||||
// `current && truth, true` => use tokens as AND
|
||||
// `current || truth, false` => use tokens as OR
|
||||
|
Loading…
Reference in New Issue
Block a user