Fixed: Invalid image URL if Artist is missing background image

(cherry picked from commit dd096e0fda71b3afa9b09c2900abbf226d8a5204)

Co-authored-by: Bogdan <mynameisbogdan@users.noreply.github.com>
This commit is contained in:
servarr[bot] 2023-06-27 03:57:31 +03:00 committed by GitHub
parent 54af0ca52d
commit 67e9ce909a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -252,6 +252,8 @@ class ArtistDetails extends Component {
expandIcon = icons.EXPAND;
}
const fanartUrl = getFanartUrl(images);
return (
<PageContent title={artistName}>
<PageToolbar>
@ -347,9 +349,11 @@ class ArtistDetails extends Component {
<div className={styles.header}>
<div
className={styles.backdrop}
style={{
backgroundImage: `url(${getFanartUrl(images)})`
}}
style={
fanartUrl ?
{ backgroundImage: `url(${fanartUrl})` } :
null
}
>
<div className={styles.backdropOverlay} />
</div>