From ff8ef8b8d279d2293358a8f7254378a6020a73dc Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 2 May 2012 17:26:55 +0100 Subject: [PATCH] Fixed problem with element child nodes being created during cloning --- rabbithole/core/modules/treenodes/element.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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