Skip falsy markers (#204)

This commit is contained in:
shark0der 2016-07-25 01:20:26 +03:00 committed by Ivan Starkov
parent 6227e4ea35
commit ef1689e7a3

View File

@ -229,6 +229,7 @@ export default class GoogleMapMarkers extends Component {
this.dimesionsCache_ = {};
const markers = React.Children.map(this.state.children, (child, childIndex) => {
if (!child) return undefined;
if (child.props.latLng === undefined &&
child.props.lat === undefined &&
child.props.lng === undefined) {