fix IE6-8 throwing error on map.remove(), close #2015
This commit is contained in:
parent
4b34362405
commit
6c77fe64c2
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user