1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-28 10:42:26 +01:00

Make iter() treat Structs as it does Arrays.

This commit is contained in:
Doug Kearns
2015-06-29 20:43:33 +10:00
parent 03322645a9
commit f4790729da

View File

@@ -1578,7 +1578,7 @@ function iter(obj, iface) {
for (let j of iter(args[i]))
yield j;
})();
else if (isinstance(obj, ["Array"]))
else if (isinstance(obj, ["Array", StructBase]))
res = obj.entries();
else if (Symbol.iterator in obj)
res = obj[Symbol.iterator]();