Skip to content

Commit

Permalink
Merge pull request #9 from Conduitry/patch-3
Browse files Browse the repository at this point in the history
only visit nodes in child arrays
  • Loading branch information
Rich-Harris authored May 27, 2019
2 parents 4915838 + 7b07d2e commit 9f034b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/estree-walker.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function visit(node, parent, enter, leave, prop, index) {

if (isArray(value)) {
for (let j = 0; j < value.length; j += 1) {
visit(value[j], node, enter, leave, key, j);
value[j] && value[j].type && visit(value[j], node, enter, leave, key, j);
}
}

Expand Down

0 comments on commit 9f034b6

Please sign in to comment.