use filter array function

This commit is contained in:
Brenden Bice 2019-04-06 14:35:18 -04:00
parent 7885955344
commit 84b6ff9f99
1 changed files with 1 additions and 4 deletions

View File

@ -260,10 +260,7 @@ const Status = {
return this.status.summary_html + '<br />' + this.status.statusnet_html
},
combinedFavsAndRepeatsAvatars () {
const combinedAvatars = [].concat(
this.statusoid.favoritedBy ? this.statusoid.favoritedBy : [],
this.statusoid.rebloggedBy ? this.statusoid.rebloggedBy : []
)
const combinedAvatars = [].concat(this.statusoid.favoritedBy, this.statusoid.rebloggedBy).filter(_ => _)
return uniqBy(combinedAvatars, 'id')
}
},