Skip to content

Commit

Permalink
Fix Promise.all for api sections (#25634)
Browse files Browse the repository at this point in the history
  • Loading branch information
tesseralis committed Jul 9, 2020
1 parent 61b4291 commit cbbed80
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions www/gatsby-node.js
Expand Up @@ -18,11 +18,7 @@ const sections = [docs, blog, showcase, starters, creators, packages, features]
// Run the provided API on all defined sections of the site
async function runApiForSections(api, helpers) {
await Promise.all(
sections.map(section => {
if (section[api]) {
section[api](helpers)
}
})
sections.map(section => section[api] && section[api](helpers))
)
}

Expand Down

0 comments on commit cbbed80

Please sign in to comment.