Skip to content

Commit 7f004cd

Browse files
youtionfridaybyte
andauthored
Update src/actions/challenges.js
Co-authored-by: Marcin Flotyński <mflotynski@gmail.com>
1 parent 0867923 commit 7f004cd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/actions/challenges.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,7 @@ export function loadChallengeDetails (projectId, challengeId) {
206206
*/
207207
export function loadGroupDetails (groupIds) {
208208
return (dispatch, getState) => {
209-
const promiseAll = []
210-
groupIds.forEach(id => {
211-
promiseAll.push(fetchGroupDetail(id))
212-
})
209+
const promiseAll = groupIds.map(id => fetchGroupDetail(id));
213210
return dispatch({
214211
type: LOAD_GROUP_DETAIL,
215212
payload: Promise.all(promiseAll).then(groups => {

0 commit comments

Comments
 (0)