use filter array function

This commit is contained in:
Brenden Bice 2019-04-06 14:35:18 -04:00
parent 7885955344
commit 84b6ff9f99

View file

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