[Pkg-javascript-commits] [leaflet] 100/301: fix IE6-8 throwing error on map.remove(), close #2015
Jonas Smedegaard
js at moszumanska.debian.org
Mon Jan 27 22:22:44 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet.
commit 6c77fe64c26735b6886dda887e95d5eeaa04fceb
Author: Vladimir Agafonkin <agafonkin at gmail.com>
Date: Fri Sep 13 18:14:05 2013 +0300
fix IE6-8 throwing error on map.remove(), close #2015
---
src/map/Map.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/map/Map.js b/src/map/Map.js
index 8565b95..82a243b 100644
--- a/src/map/Map.js
+++ b/src/map/Map.js
@@ -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) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git
More information about the Pkg-javascript-commits
mailing list