Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Replace forEach with for..of to allow promise to complete #24

Merged
merged 1 commit into from
Dec 11, 2019
Merged

Replace forEach with for..of to allow promise to complete #24

merged 1 commit into from
Dec 11, 2019

Conversation

kamaz
Copy link
Contributor

@kamaz kamaz commented Dec 11, 2019

After configuring serverless-webpack I've noticed that NewRelic configuration is not being generated. With a little bit debugging I found the problem with for each and replaced with for .. of.

Placed the link that explain the problem below:
https://stackoverflow.com/questions/37576685/using-async-await-with-a-foreach-loop

And output after adding console log:
forEach
Screenshot 2019-12-11 at 21 47 27

for..of
Screenshot 2019-12-11 at 21 46 44

I hope it helps.

@kolanos kolanos merged commit df0b961 into newrelic:master Dec 11, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants