diff --git a/examples/Scripts/BooleanOperations.html b/examples/Scripts/BooleanOperations.html index 7520ab6c..f9017c69 100644 --- a/examples/Scripts/BooleanOperations.html +++ b/examples/Scripts/BooleanOperations.html @@ -360,10 +360,9 @@ function disperse(path, distance) { distance = distance || 10; - if (! path instanceof CompoundPath || ! path instanceof Group) { return; } var center = path.bounds.center; var children = path.children, i ,len; - for (var i = 0, len = children.length; i < len; i++) { + for (var i = 0, len = children && children.length; i < len; i++) { var cCenter = children[i].bounds.center; var vec = cCenter.subtract(center); vec = (vec.isClose([0,0], 0.5))? vec : vec.normalize(distance);