fix IE6-8 throwing error on map.remove(), close #2015

This commit is contained in:
Vladimir Agafonkin 2013-09-13 18:14:05 +03:00
parent 4b34362405
commit 6c77fe64c2

View File

@ -316,7 +316,12 @@ L.Map = L.Class.extend({
this._initEvents('off');
delete this._container._leaflet;
try {
// throws error in IE6-8
delete this._container._leaflet;
} catch (e) {
this._container._leaflet = undefined;
}
this._clearPanes();
if (this._clearControlPos) {