added check for props
This commit is contained in:
parent
2cb980822b
commit
9dc5c4d69c
|
@ -73,8 +73,10 @@ export class MapContainer extends Component {
|
|||
let lat = e.latLng.lat();
|
||||
let lng = e.latLng.lng();
|
||||
|
||||
if (this.props.onClick) {
|
||||
this.props.onClick(lat,lng);
|
||||
}
|
||||
}
|
||||
|
||||
// Set the state of the component to contain user coordinates and initial
|
||||
// marker and info window information
|
||||
|
|
Loading…
Reference in New Issue