You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const maxParallelRequests = 1;
const limit = pLimit(maxParallelRequests);
// Use the map method to create an array of promises for each call to GetData
const promises = items.map(item => {
limit(() => this.getData(item))
});
When I log promises I get an array of 60 undefined items.
What am I doing wrong here?
item is defined inside the map function.
The text was updated successfully, but these errors were encountered:
When I log
promises
I get an array of 60undefined
items.What am I doing wrong here?
item
is defined inside the map function.The text was updated successfully, but these errors were encountered: