Skip to content

Commit

Permalink
Don't attempt to filter non-place results
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Nov 20, 2023
1 parent 2285c4d commit 1a92439
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/SearchBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,10 @@ class SearchBox extends React.Component {
}
return results.map(group => {
const newItems = group.items.filter(item => {
const resultType = item.type || SearchResultType.PLACE;
if (resultType !== SearchResultType.PLACE) {
return true;
}
let geometry = null;
if (item.geometry) {
geometry = VectorLayerUtils.reprojectGeometry(item.geometry, item.crs, this.props.map.projection);
Expand Down

0 comments on commit 1a92439

Please sign in to comment.