diff --git a/src/tiledimage.js b/src/tiledimage.js index 0c666f1e..6ff3273c 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -1299,13 +1299,9 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag )) ); - if (!highestLevel) { - highestLevel = 0; - } - // Calculations for the interval of levels to draw // can return invalid intervals; fix that here if necessary - highestLevel = Math.max(highestLevel, this.source.minLevel || 0); + highestLevel = Math.max(highestLevel || 0, this.source.minLevel || 0); lowestLevel = Math.min(lowestLevel, highestLevel); return { lowestLevel: lowestLevel,