mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Check that map exists before accessing properties on it. Closes #5159
This commit is contained in:
parent
8e540b52d2
commit
e573fdec52
1 changed files with 2 additions and 0 deletions
|
@ -206,6 +206,7 @@ define(function (require) {
|
|||
});
|
||||
|
||||
this.map.on('moveend', function setZoomCenter(ev) {
|
||||
if (!self.map) return;
|
||||
// update internal center and zoom references
|
||||
self._mapCenter = self.map.getCenter();
|
||||
self._mapZoom = self.map.getZoom();
|
||||
|
@ -245,6 +246,7 @@ define(function (require) {
|
|||
});
|
||||
|
||||
this.map.on('zoomend', function () {
|
||||
if (!self.map) return;
|
||||
self._mapZoom = self.map.getZoom();
|
||||
if (!self._events) return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue