Skip to content

Commit 94f397a

Browse files
committed
fix bug 1935
1 parent a3e3ca1 commit 94f397a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

processing.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,6 @@
430430
* @param {Object} obj The object to be iterated.
431431
*/
432432
var ObjectIterator = function(obj) {
433-
if (obj.iterator instanceof Function) {
434-
return obj.iterator();
435-
}
436433
if (obj instanceof Array) {
437434
// iterate through array items
438435
var index = -1;
@@ -442,6 +439,8 @@
442439
this.next = function() {
443440
return obj[index];
444441
};
442+
} else if (obj.iterator instanceof Function) {
443+
return obj.iterator();
445444
} else {
446445
throw "Unable to iterate: " + obj;
447446
}

0 commit comments

Comments
 (0)