mirror of
https://github.com/visgl/react-map-gl.git
synced 2026-01-18 15:54:22 +00:00
check that context.map exists (#974)
This commit is contained in:
parent
28f0b6e01a
commit
ed7d8df842
@ -143,7 +143,9 @@ export default class NavigationControl extends BaseControl<
|
||||
const {className, showCompass, showZoom, zoomInLabel, zoomOutLabel, compassLabel} = this.props;
|
||||
|
||||
if (!this._uiVersion) {
|
||||
this._uiVersion = getUIVersion(this._context.map.version);
|
||||
// map may not exist if context is provided by user application (e.g. DeckGL)
|
||||
const {map} = this._context;
|
||||
this._uiVersion = getUIVersion(map && map.version);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user