diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index cd862b2c..75c950b3 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -2900,8 +2900,8 @@ function SvgCanvas(c) this.cloneSelectedElements = function() { var batchCmd = new BatchCommand("Clone Elements"); var copiedElements = []; - var len = selectedElements.length; - for (var i = 0; i < len; ++i) { + var i = selectedElements.length; + while(i--) { var elem = selectedElements[i]; if (elem == null) break; copiedElements.push(elem.cloneNode(true));