From 6276021bd9bd9342d79e40d786bad0b6e76e7e4a Mon Sep 17 00:00:00 2001 From: danzel Date: Mon, 15 Apr 2013 10:11:49 +1200 Subject: [PATCH] Fix some warnings from new uglify --- build/build.js | 2 +- src/MarkerClusterGroup.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/build.js b/build/build.js index 40cc948e5..b41c7e114 100644 --- a/build/build.js +++ b/build/build.js @@ -66,7 +66,7 @@ exports.uglify = function (code) { }; exports.combineFiles = function (files) { - var content = '(function (window, undefined) {\n\n', + var content = '(function () {\n\n', i, len; for (i = 0, len = files.length; i < len; i += 1) { diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js index f27d5b6e9..a694dd640 100644 --- a/src/MarkerClusterGroup.js +++ b/src/MarkerClusterGroup.js @@ -355,8 +355,8 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({ //Overrides FeatureGroup.onRemove onRemove: function (map) { - this._map.off('zoomend', this._zoomEnd, this); - this._map.off('moveend', this._moveEnd, this); + map.off('zoomend', this._zoomEnd, this); + map.off('moveend', this._moveEnd, this); this._unbindEvents();