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();