mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Check if SVG nodes could be converted before adding them as children.
This commit is contained in:
parent
86a1a17b8d
commit
c49a0c6ad4
1 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue