XObject.js
authorAlan Knowles <alan@roojs.com>
Wed, 9 May 2012 05:24:46 +0000 (13:24 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 9 May 2012 05:24:46 +0000 (13:24 +0800)
Attribute Changed :XObject.js

XObject.js

index 586067e..0560b78 100644 (file)
@@ -118,11 +118,12 @@ function XObject (cfg) {
    var n=0; 
     var items = []
 print("len:" + this.items.length);
-    this.items.forEach(function(i) {
+    if(this.items.length) { this.items.forEach(function(i) {
          print(n++); 
        items.push(i);
     });
-   print("done copy"); 
+
+}   print("done copy"); 
 
        this.items = [];
     // create XObject for all the children.