Skip to content

Commit

Permalink
fix less#339
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Apr 28, 2014
1 parent 580e946 commit 4f771ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/carto/tree/definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ tree.Definition.prototype.symbolizersToXML = function(env, symbolizers, zoom) {
}

sym_order = symbolizerList(sym_order);
var sym_count = 0;

for (var i = 0; i < sym_order.length; i++) {
var attributes = symbolizers[sym_order[i]];
Expand All @@ -105,6 +106,7 @@ tree.Definition.prototype.symbolizersToXML = function(env, symbolizers, zoom) {
// Skip the magical * symbolizer which is used for universal properties
// which are bubbled up to Style elements intead of Symbolizer elements.
if (symbolizer === '*') continue;
sym_count++;

var fail = tree.Reference.requiredProperties(symbolizer, attributes);
if (fail) {
Expand Down Expand Up @@ -147,7 +149,7 @@ tree.Definition.prototype.symbolizersToXML = function(env, symbolizers, zoom) {
}
}
}
if (!xml) return '';
if (!sym_count || !xml) return '';
return ' <Rule>\n' + xml + ' </Rule>\n';
};

Expand Down

0 comments on commit 4f771ed

Please sign in to comment.