turn array for ins into fors

This commit is contained in:
Sebastian McKenzie
2015-01-16 02:25:41 +11:00
parent 71879d6e8f
commit 0627cd94d4
18 changed files with 45 additions and 43 deletions

View File

@@ -440,7 +440,7 @@ t.getIds = function (node, map, ignoreTypes) {
if (t.isIdentifier(id)) {
ids[id.name] = id;
} else if (nodeKeys) {
for (i in nodeKeys) {
for (i = 0; i < nodeKeys.length; i++) {
key = nodeKeys[i];
if (id[key]) {
search.push(id[key]);
@@ -448,7 +448,7 @@ t.getIds = function (node, map, ignoreTypes) {
}
}
} else if (arrKeys) {
for (i in arrKeys) {
for (i = 0; i < arrKeys.length; i++) {
key = arrKeys[i];
search = search.concat(id[key] || []);
}