From 10cd2623720ccd0631dd4645ca6294cf84a6b87b Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Thu, 24 Sep 2009 03:14:43 +0000 Subject: [PATCH] Minor nit fix git-svn-id: http://svg-edit.googlecode.com/svn/trunk@702 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 56a646be..3b2d777e 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -2642,7 +2642,7 @@ function BatchCommand(text) { for (var i = 0; i < numchildren; ++i) { var child = svgzoom.childNodes.item(i); // for each g, find its layer name - if (child) { + if (child && child.nodeType == 1) { if (child.tagName == "g") { var name = getLayerName(child); // store layer and name in global variable @@ -2653,7 +2653,7 @@ function BatchCommand(text) { walkTree(child, function(e){e.setAttribute("style", "pointer-events:none");}); } } - else if (child.nodeType == 1) { + else { orphans.push(child); } }