diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 9f6c591749..861546730c 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -354,8 +354,7 @@ OpenLayers.Map.prototype = { if (newBaseLayer != this.baseLayer) { // is newBaseLayer an already loaded layer? - var foundLayer = (this.layers.indexOf(newBaseLayer) != -1); - if (foundLayer) { + if (this.layers.indexOf(newBaseLayer) != -1) { // make the old base layer invisible if (this.baseLayer != null) {