Skip to content
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

Fix Promise.allSettled polyfill #1944

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TravellerOnline
Copy link

Описание

функция Promise.allSettled принимает итерируемый объект (не обязательно массив) как параметр, но в теле функции в учебнике используется метод map на этом итерируемом объекте, что даст ошибку, если там не массив. Поэтому логичнее обернуть сначала этот объект в Array.from(), и затем использовать метод массива map

@javascript-translate-bot javascript-translate-bot added the review needed Review needed, please approve or request changes label Mar 27, 2024
@javascript-translate-bot javascript-translate-bot requested a review from a team March 27, 2024 21:07
@CLAassistant
Copy link

CLAassistant commented Mar 27, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review needed Review needed, please approve or request changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants