symbolizersToXML: Do not assume tagcontent has a value
Fixes #297 See https://github.com/mapbox/carto/pull/207
This commit is contained in:
parent
a6439e3f92
commit
c89ed510ff
@ -129,7 +129,7 @@ tree.Definition.prototype.symbolizersToXML = function(env, symbolizers, zoom) {
|
||||
if (selfclosing) {
|
||||
xml += '/>\n';
|
||||
} else {
|
||||
if (tagcontent.indexOf('<Format') != -1) {
|
||||
if (tagcontent && tagcontent.indexOf('<') != -1) {
|
||||
xml += '>' + tagcontent + '</' + name + '>\n';
|
||||
} else {
|
||||
xml += '><![CDATA[' + tagcontent + ']]></' + name + '>\n';
|
||||
|
Loading…
Reference in New Issue
Block a user