[Commits] r1313 - core/trunk/geoext/lib/GeoExt/widgets

commits at geoext.org commits at geoext.org
Fri Aug 7 13:36:36 CEST 2009


Author: ahocevar
Date: 2009-08-07 13:36:36 +0200 (Fri, 07 Aug 2009)
New Revision: 1313

Modified:
   core/trunk/geoext/lib/GeoExt/widgets/LegendWMS.js
Log:
check if there are any styles before we proceed. r=tschaub (closes #140)


Modified: core/trunk/geoext/lib/GeoExt/widgets/LegendWMS.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/widgets/LegendWMS.js	2009-08-06 15:08:56 UTC (rev 1312)
+++ core/trunk/geoext/lib/GeoExt/widgets/LegendWMS.js	2009-08-07 11:36:36 UTC (rev 1313)
@@ -107,7 +107,7 @@
         var url, layerName, styleName;
         for (var i = 0, len = layers.length; i < len; i++){
             layerName = layers[i];
-            if(styles) {
+            if(styles && styles.length > 0) {
                 styleName = styleNames && styleNames[i];
                 if(styleName) {
                     Ext.each(styles, function(s) {



More information about the Commits mailing list