Skip to content

Commit

Permalink
Merge pull request #269 from performant-software/RB-null-geometry-fix
Browse files Browse the repository at this point in the history
Fix placemarkers component to handle null geometry
  • Loading branch information
ajolipa authored Mar 18, 2024
2 parents 0135a25 + 0a42095 commit 1740b91
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/core-data/src/components/PlaceMarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ const PlaceMarkers = (props: Props) => {
* @type {function(*): *}
*/
const onLoad = useCallback((records) => (
_.map(records, (record) => setPlaces((prevPlaces) => [
...prevPlaces,
feature(record.geometry, record.properties)
]))
_.map(records, (record) => setPlaces((prevPlaces) => record.geometry
? [
...prevPlaces,
feature(record.geometry, record.properties)
]
: prevPlaces))
), []);

/**
Expand Down

0 comments on commit 1740b91

Please sign in to comment.