Split code for added clarity.

master
KB Jørgensen 2016-11-14 10:08:06 +01:00
parent 4994deb6ec
commit c65f98b0ba
1 changed files with 5 additions and 3 deletions

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