If a popup is removed from the map during viewreset we still try to remove it from the map, check we are still on the map first. Fixes #1094

This commit is contained in:
danzel 2012-10-29 09:39:45 +13:00
parent 774fe5c594
commit ef42973682

View File

@ -189,6 +189,8 @@ L.Popup = L.Class.extend({
}, },
_updatePosition: function () { _updatePosition: function () {
if (!this._map) { return; }
var pos = this._map.latLngToLayerPoint(this._latlng), var pos = this._map.latLngToLayerPoint(this._latlng),
is3d = L.Browser.any3d, is3d = L.Browser.any3d,
offset = this.options.offset; offset = this.options.offset;