Added guard to map object

This commit is contained in:
orangemug 2018-09-20 19:16:23 +01:00
parent 805133d10c
commit 77475af3c6

View file

@ -109,8 +109,10 @@ export default class MapboxGlMap extends React.Component {
this.state.inspect.render() this.state.inspect.render()
} }
map.showTileBoundaries = this.props.options.showTileBoundaries; if (map) {
map.showCollisionBoxes = this.props.options.showCollisionBoxes; map.showTileBoundaries = this.props.options.showTileBoundaries;
map.showCollisionBoxes = this.props.options.showCollisionBoxes;
}
} }
componentDidMount() { componentDidMount() {