Merge pull request #386 from orangemug/fix/showTileBoundaries-error

Added guard to map object
This commit is contained in:
Orange Mug 2018-09-22 16:15:00 +01:00 committed by GitHub
commit 225d0388ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,9 +111,11 @@ export default class MapboxGlMap extends React.Component {
this.state.inspect.render() this.state.inspect.render()
} }
if (map) {
map.showTileBoundaries = this.props.options.showTileBoundaries; map.showTileBoundaries = this.props.options.showTileBoundaries;
map.showCollisionBoxes = this.props.options.showCollisionBoxes; map.showCollisionBoxes = this.props.options.showCollisionBoxes;
} }
}
componentDidMount() { componentDidMount() {
if(!IS_SUPPORTED) return; if(!IS_SUPPORTED) return;