Revert "fix IE6-8 throwing error on map.remove()" (#9782)

This commit is contained in:
Simon Legner
2025-07-06 18:20:19 +02:00
committed by GitHub
parent dc4f1a8eb5
commit 170b72efa1

View File

@ -754,16 +754,8 @@ export const Map = Evented.extend({
throw new Error('Map container is being reused by another instance');
}
try {
// throws error in IE6-8
delete this._container._leaflet_id;
delete this._containerId;
} catch (e) {
/*eslint-disable */
this._container._leaflet_id = undefined;
/* eslint-enable */
this._containerId = undefined;
}
delete this._container._leaflet_id;
delete this._containerId;
if (this._locationWatchId !== undefined) {
this.stopLocate();