added check for props

This commit is contained in:
Al Duncanson 2018-10-03 16:41:09 -04:00
parent 2cb980822b
commit 9dc5c4d69c
1 changed files with 3 additions and 1 deletions

View File

@ -73,8 +73,10 @@ export class MapContainer extends Component {
let lat = e.latLng.lat(); let lat = e.latLng.lat();
let lng = e.latLng.lng(); let lng = e.latLng.lng();
if (this.props.onClick) {
this.props.onClick(lat,lng); this.props.onClick(lat,lng);
} }
}
// Set the state of the component to contain user coordinates and initial // Set the state of the component to contain user coordinates and initial
// marker and info window information // marker and info window information