Skip to content

Commit

Permalink
dont check for _map, nullify the variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jgravois committed Feb 18, 2017
1 parent 18062d4 commit 86708f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Layers/RasterLayer.js
Expand Up @@ -235,8 +235,9 @@ export var RasterLayer = L.Layer.extend({
}

if (zoom > this.options.maxZoom || zoom < this.options.minZoom) {
if (this._currentImage && this._currentImage._map) {
if (this._currentImage) {
this._currentImage._map.removeLayer(this._currentImage);
this._currentImage = null;
}
return;
}
Expand Down

0 comments on commit 86708f8

Please sign in to comment.