drowsy-probius / twitch-icon-selector

Use shorthand promise methods JS-C1004
Anti-pattern
Minor
2 years ago2 years old
Use shorthand promise resolution method
 44  if(icons.length === 0) return;
 45
 46  Promise.all(icons.map(icon => {
 47    return new Promise((resolve) => { 48      resolve({ 49        "key": icon.nameHash, 50        "value": streamerIconStats[icon.nameHash] + 1 || 1 51      }); 52    }) 53  }))
 54  .then(async data => {
 55    const merged = {};