Skip to content

Commit

Permalink
fix(Geosuggest.jsx): Use filter over find to fix IE11 compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: petetnt <pete.a.nykanen@gmail.com>
  • Loading branch information
petetnt committed Jun 19, 2017
1 parent 27b2f08 commit 5dfff64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Geosuggest.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ class Geosuggest extends React.Component {
let activeSuggest = this.state.activeSuggest;

if (activeSuggest) {
const newSuggest = suggests.find(listedSuggest =>
const newSuggest = suggests.filter(listedSuggest =>
activeSuggest.placeId === listedSuggest.placeId &&
activeSuggest.isFixture === listedSuggest.isFixture
);
)[0];

activeSuggest = newSuggest || null;
}
Expand Down

0 comments on commit 5dfff64

Please # to comment.