use filter array function
This commit is contained in:
parent
7885955344
commit
84b6ff9f99
1 changed files with 1 additions and 4 deletions
|
@ -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')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue