diff --git a/rabbithole/core/modules/treenodes/element.js b/rabbithole/core/modules/treenodes/element.js index fe9fe41f1..2673fc9a4 100644 --- a/rabbithole/core/modules/treenodes/element.js +++ b/rabbithole/core/modules/treenodes/element.js @@ -17,7 +17,7 @@ var Element = function(type,attributes,children) { if(this instanceof Element) { this.type = type; this.attributes = attributes || {}; - this.children = children || []; + this.children = children; } else { return new Element(type,attributes,children); } @@ -27,16 +27,21 @@ Element.prototype = new Node(); Element.prototype.constructor = Element; Element.prototype.clone = function() { - var childClones = []; - for(var t=0; t