chore: simplify map
This commit is contained in:
parent
4637a63042
commit
24d9a85457
1 changed files with 1 additions and 2 deletions
|
@ -38,7 +38,6 @@ module.exports = {
|
|||
* @returns {Array} - a new array sorted by the number of plays in descending order.
|
||||
*/
|
||||
sortByPlays: (array) => Object.values(array).sort((a, b) => b.plays - a.plays).map((media, index) => {
|
||||
media.rank = index + 1
|
||||
return media
|
||||
return media.rank = index + 1
|
||||
}),
|
||||
}
|
||||
|
|
Reference in a new issue