Null ref fix: (#5736)

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
This commit is contained in:
Alexander Musienko 2017-09-19 01:46:19 -07:00 committed by Vladimir Agafonkin
parent 8bd5578860
commit 8ae4689a93

View File

@ -178,7 +178,7 @@ export var Marker = Layer.extend({
update: function () { update: function () {
if (this._icon) { if (this._icon && this._map) {
var pos = this._map.latLngToLayerPoint(this._latlng).round(); var pos = this._map.latLngToLayerPoint(this._latlng).round();
this._setPos(pos); this._setPos(pos);
} }