Skip to content

Commit

Permalink
docs(array-foreach): fix code example using redundant async/await
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Jan 30, 2020
1 parent da0a19a commit 5a50ef4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/rules/array-foreach.md
Expand Up @@ -85,7 +85,7 @@ If `polishApple` need to do some async work, then we'd need to refactor the iter
```diff
- apples.forEach(polishApple)
+ await Promise.all(
+ apples.map(async apple => await polishApple(apple))
+ apples.map(polishApple)
+ )
```

Expand Down

0 comments on commit 5a50ef4

Please sign in to comment.