Skip to content

Fix Promise.allSettled polyfill #1944

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update article.md
  • Loading branch information
TravellerOnline authored Mar 27, 2024
commit 6f4e3912ef6bfd13c7a2520e5cb07df4b94fbc8d
2 changes: 1 addition & 1 deletion 1-js/11-async/05-promise-api/article.md
Original file line number Diff line number Diff line change
@@ -186,7 +186,7 @@ Promise.allSettled(urls.map(url => fetch(url)))
```js
if(!Promise.allSettled) {
Promise.allSettled = function(promises) {
return Promise.all(promises.map(p => Promise.resolve(p).then(value => ({
return Promise.all(Array.from(promises).map(p => Promise.resolve(p).then(value => ({
status: 'fulfilled',
value: value
}), error => ({