Skip to content

Commit

Permalink
marker: Fix onRemove handler
Browse files Browse the repository at this point in the history
this._map is nulled before removeIcon call

Signed-off-by: Pavel Shramov <shramov@mexmat.net>
  • Loading branch information
shramov committed Sep 30, 2011
1 parent d15d20b commit 4ff6229
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/layer/marker/Marker.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ L.Marker = L.Class.extend({
},

onRemove: function(map) {
this._map = null;

this._removeIcon();
this._map = null;

// TODO move to Marker.Popup.js
if (this.closePopup) {
Expand Down

0 comments on commit 4ff6229

Please sign in to comment.