We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3e3ca1 commit 94f397aCopy full SHA for 94f397a
processing.js
@@ -430,9 +430,6 @@
430
* @param {Object} obj The object to be iterated.
431
*/
432
var ObjectIterator = function(obj) {
433
- if (obj.iterator instanceof Function) {
434
- return obj.iterator();
435
- }
436
if (obj instanceof Array) {
437
// iterate through array items
438
var index = -1;
@@ -442,6 +439,8 @@
442
439
this.next = function() {
443
440
return obj[index];
444
441
};
+ } else if (obj.iterator instanceof Function) {
+ return obj.iterator();
445
} else {
446
throw "Unable to iterate: " + obj;
447
}
0 commit comments