Skip to content

Commit

Permalink
redraw don't crash if this._map doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanxiangFranck authored Aug 5, 2016
1 parent a7f07cb commit d2871b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HeatLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ L.HeatLayer = (L.Layer ? L.Layer : L.Class).extend({
},

redraw: function () {
if (this._heat && !this._frame && !this._map._animating) {
if (this._heat && !this._frame && this._map && !this._map._animating) {
this._frame = L.Util.requestAnimFrame(this._redraw, this);
}
return this;
Expand Down

0 comments on commit d2871b3

Please sign in to comment.