From 59dd8b2d99a85cbc4c4388d3982cd1076765b114 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Thu, 20 Dec 2007 13:01:19 +0000 Subject: [PATCH] Fix to "style with no rule returns empty array" via the 'unruly.patch' from tschaub. -10 points for bad pun, +10 points for catching this in his review of the SLD code. r=me (Closes #1223) git-svn-id: http://svn.openlayers.org/trunk/openlayers@5536 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Format/SLD.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/OpenLayers/Format/SLD.js b/lib/OpenLayers/Format/SLD.js index 74b75c3d27..042d07935d 100644 --- a/lib/OpenLayers/Format/SLD.js +++ b/lib/OpenLayers/Format/SLD.js @@ -172,14 +172,14 @@ OpenLayers.Format.SLD = OpenLayers.Class(OpenLayers.Format.XML, { var ruleNodes = this.getElementsByTagNameNS( xmlNode, this.sldns, "Rule" ); - // I don't think you really want to return [] here - if (ruleNodes.length == 0) { return []; } - var rules = userStyle.rules; - var ruleName; - for (var i=0; i 0) { + var rules = userStyle.rules; + var ruleName; + for (var i=0; i