Skip to content

Commit

Permalink
Null check onGeocodingSelection before calling in MapDraw (#312)
Browse files Browse the repository at this point in the history
* null check onGeocodingSelection

* remove changes from other PR

* "
  • Loading branch information
camdendotlol authored Jan 6, 2025
1 parent 10af114 commit c923573
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/geospatial/src/components/MapDraw.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ const MapDraw = (props: Props) => {
onChange();

// Call the onGeocoding selection callback
props.onGeocodingSelection(detail);
if (props.onGeocodingSelection) {
props.onGeocodingSelection(detail);
}
}
}, [isValid, onChange, props.onGeocodingSelection]);

Expand Down

0 comments on commit c923573

Please sign in to comment.