diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 718aaea2..0d16031d 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -223,9 +223,11 @@ var addSvgElementFromJson = this.addSvgElementFromJson = function(data) { svgedit.utilities.cleanupElement(shape); // Children - if(data.children) data.children.forEach(function(child){ - shape.appendChild(addSvgElementFromJson(child)); - }); + if(data.children) { + data.children.forEach(function(child) { + shape.appendChild(addSvgElementFromJson(child)); + }); + } return shape; };