Split code for added clarity.

This commit is contained in:
KB Jørgensen
2016-11-14 10:08:06 +01:00
parent 4994deb6ec
commit c65f98b0ba

View File

@@ -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;
};