Fixed crash raised in issue #647

This commit is contained in:
orangemug 2020-04-13 08:39:23 +01:00
parent 0858a16ffc
commit 578a920b6d

View file

@ -110,11 +110,11 @@ export default class MapboxGlMap extends React.Component {
this.state.inspect._popupBlocked = false;
this.state.inspect.toggleInspector()
}
if(this.props.inspectModeEnabled) {
this.state.inspect.render()
}
if (map) {
if (this.props.inspectModeEnabled) {
this.state.inspect.render();
}
map.showTileBoundaries = this.props.options.showTileBoundaries;
map.showCollisionBoxes = this.props.options.showCollisionBoxes;
map.showOverdrawInspector = this.props.options.showOverdrawInspector;