Skip to content

Commit

Permalink
fix labal removal on level '0'
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaltom committed Jun 12, 2019
1 parent f30b5b0 commit 68e3899
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion leaflet-indoor.js
Expand Up @@ -127,7 +127,7 @@ L.Indoor = L.Layer.extend({
return this._layers;
},
toggleLabels: function() {
if (Number.isInteger(this.options.minCaptionZoom) && this._level && this._map.getZoom() >= this.options.minCaptionZoom) {
if (Number.isInteger(this.options.minCaptionZoom) && this._level !== undefined && this._map.getZoom() >= this.options.minCaptionZoom) {
this._layers[this._level].addLayer(this._layers[this._level].roomLabels);
} else if (this._level) {
this._layers[this._level].removeLayer(this._layers[this._level].roomLabels)
Expand Down

0 comments on commit 68e3899

Please sign in to comment.