From 8ae4689a93df370001e70a472d79c106c5702896 Mon Sep 17 00:00:00 2001 From: Alexander Musienko Date: Tue, 19 Sep 2017 01:46:19 -0700 Subject: [PATCH] Null ref fix: (#5736) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TypeError: Cannot read property latLngToLayerPoint of null\n    at NewClass.update (http://my.uboro.eu/js/vendor/leaflet-1.2.0.js?t=1503882088:7295:23)\n    at NewClass.setLatLng (http://my.uboro.eu/js/vendor/leaflet-1.2.0.js?t=1503882088:7256:8)\n --- src/layer/marker/Marker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layer/marker/Marker.js b/src/layer/marker/Marker.js index 0b7d13a1..15c02301 100644 --- a/src/layer/marker/Marker.js +++ b/src/layer/marker/Marker.js @@ -178,7 +178,7 @@ export var Marker = Layer.extend({ update: function () { - if (this._icon) { + if (this._icon && this._map) { var pos = this._map.latLngToLayerPoint(this._latlng).round(); this._setPos(pos); }