map changed to some

This commit is contained in:
Sol Abrahams
2020-09-17 19:27:53 +01:00
parent a1e772b72f
commit f9a0cd77b2

View File

@@ -39,8 +39,9 @@ class Search extends React.Component {
searchResults = []
} else {
searchResults = this.props.events.filter(event =>
searchAttributes.map(attribute => { event[attribute].toLowerCase().includes(this.props.queryString.toLowerCase()) })
searchAttributes.some(attribute => event[attribute].toLowerCase().includes(this.props.queryString.toLowerCase()))
)
console.log(searchResults)
}
return (