diff --git a/lib/OpenLayers/Style.js b/lib/OpenLayers/Style.js index 10a473cdad..8ce9949d16 100644 --- a/lib/OpenLayers/Style.js +++ b/lib/OpenLayers/Style.js @@ -161,8 +161,6 @@ OpenLayers.Style = OpenLayers.Class({ // don't display if there were rules but none applied if(rules.length > 0 && appliedRules == false) { style.display = "none"; - } else { - style.display = ""; } return style; diff --git a/tests/Style.html b/tests/Style.html index 754ed1be85..cce714e1c1 100644 --- a/tests/Style.html +++ b/tests/Style.html @@ -75,19 +75,19 @@ createdStyle = style.createSymbolizer(feature); // at this scale, the feature should be green - t.eq(createdStyle.display, "", "Feature is visible at scale "+map.getScale()); + t.eq(createdStyle.display, undefined, "Feature is visible at scale "+map.getScale()); t.eq(createdStyle.fillColor, "green", "Point symbolizer from rule applied correctly."); map.setCenter(new OpenLayers.LonLat(3,5), 9); // at this scale, the feature should be red createdStyle = style.createSymbolizer(feature); - t.eq(createdStyle.display, "", "Feature is visible at scale "+map.getScale()); + t.eq(createdStyle.display, undefined, "Feature is visible at scale "+map.getScale()); t.eq(createdStyle.fillColor, "yellow", "Point symbolizer from rule applied correctly."); map.setCenter(new OpenLayers.LonLat(3,5), 8); // at this scale, the feature should be yellow createdStyle = style.createSymbolizer(feature); - t.eq(createdStyle.display, "", "Feature is visible at scale "+map.getScale()); + t.eq(createdStyle.display, undefined, "Feature is visible at scale "+map.getScale()); t.eq(createdStyle.fillColor, "red", "Point symbolizer from rule applied correctly."); map.setCenter(new OpenLayers.LonLat(3,5), 7);