Closed lnedry closed 12 months ago
Thanks @lnedry. @hussam789 take a look please
Hi @lnedry The suggestion was about:
Use `Array.prototype.forEach` and `Promise.allSettled` instead of `Array.prototype.map` and `Promise.all` to ensure all promises are settled before proceeding.
The suggestion was accompanied by a preview code to demonstrate the suggestion (high-level changes). The preview code explicitly stated that it uses an abbreviation of code blocks to shorten and simplify the preview:
// code omitted for brevity
Once you choose this suggestion and invoke apply
, you will get a diff view showing the final full implementation with before
and after
code for you to approve.
The "unused" variable promises
will be used in the full implementation.
Thank you for the clarification!
Request ID: 1984d836-1c8f-48d8-b06d-0440eb1eac26
One of the Code Suggestions suggests using Promise.allSettled instead of Promise.all but the suggested code is incomplete.
It creates an empty array for promises but never inserts anything into that array.
Base Code:
Suggested Code: