Skip to content

Commit

Permalink
Fix race condition when adding sharp images to products
Browse files Browse the repository at this point in the history
  • Loading branch information
diogobeda committed Jun 26, 2019
1 parent c141bfa commit e37d841
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,12 @@ const mapMediaToNodes = async ({
}

if (n.images && n.images.length) {
await n.images.map(async image => {
downloadMedia({
for (let image of n.images) {
await downloadMedia({
image,
...commonParams,
})
})
}
return n
} else if (n.image && n.image.id) {
const { image } = n
Expand Down

0 comments on commit e37d841

Please sign in to comment.