Skip to content

Commit

Permalink
Fix Suggestions.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Jan 4, 2024
1 parent 74b1aae commit 388fc87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions isimip_data/search/assets/js/components/Suggestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class Suggestions extends Component {

render() {
const { count, suggestions, onClick } = this.props
const suggestionsList = suggestions === null ? [] :suggestions.reduce((cur, agg) => {
if (cur.length > 0) agg.push(cur)
return agg
const suggestionsList = (suggestions === null) ? [] : suggestions.reduce((acc, cur) => {
if (cur.length > 0) acc.push(cur)
return acc
}, [])

return (count == 0) && (
Expand Down

0 comments on commit 388fc87

Please sign in to comment.