mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 08:19:55 +02:00
Fix #1016: fixed broken fallback to album cover on artist card/detail
This commit is contained in:
parent
9f3ca7b4c5
commit
8a0cf918da
2 changed files with 4 additions and 4 deletions
|
@ -51,13 +51,13 @@ export default {
|
||||||
return url
|
return url
|
||||||
},
|
},
|
||||||
cover () {
|
cover () {
|
||||||
if (this.artist.cover) {
|
if (this.artist.cover && this.artist.cover.original) {
|
||||||
return this.artist.cover
|
return this.artist.cover
|
||||||
}
|
}
|
||||||
return this.artist.albums.map((a) => {
|
return this.artist.albums.map((a) => {
|
||||||
return a.cover
|
return a.cover
|
||||||
}).filter((c) => {
|
}).filter((c) => {
|
||||||
return !!c
|
return c && c.original
|
||||||
})[0] || {}
|
})[0] || {}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,12 +230,12 @@ export default {
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
cover() {
|
cover() {
|
||||||
if (this.object.cover) {
|
if (this.object.cover && this.object.cover.original) {
|
||||||
return this.object.cover
|
return this.object.cover
|
||||||
}
|
}
|
||||||
return this.object.albums
|
return this.object.albums
|
||||||
.filter(album => {
|
.filter(album => {
|
||||||
return album.cover
|
return album.cover && album.cover.original
|
||||||
})
|
})
|
||||||
.map(album => {
|
.map(album => {
|
||||||
return album.cover
|
return album.cover
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue