Skip to content

Commit

Permalink
Fixes missing let in for...of causing issues
Browse files Browse the repository at this point in the history
```
ReferenceError: assignment to undeclared variable child
```

When using ES modules (I assume that's the root cause), the absence of `let` breaks this script.
  • Loading branch information
lopis committed Mar 5, 2021
1 parent 9eec15f commit 6711cd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -25,7 +25,7 @@ module.exports = function extract(options = {}) {
return
}

for (child of children) {
for (let child of children) {
if (each(child)) {
return 1
}
Expand Down

0 comments on commit 6711cd5

Please sign in to comment.