Check if SVG nodes could be converted before adding them as children.

This commit is contained in:
Jürg Lehni 2012-12-09 16:53:52 -08:00
parent 86a1a17b8d
commit c49a0c6ad4

View file

@ -209,8 +209,11 @@ new function() {
// Override default SVG style on groups, then apply style.
attrs.fill = 'none';
var svg = createElement('g', attrs);
for (var i = 0, l = children.length; i < l; i++)
svg.appendChild(children[i].exportSvg());
for (var i = 0, l = children.length; i < l; i++) {
var child = children[i].exportSvg();
if (child)
svg.appendChild(child);
}
return svg;
}