Fixed: Invalid image URL if Series is missing background image

This commit is contained in:
Bogdan 2023-06-27 01:23:18 +03:00 committed by GitHub
parent bb952e5ddf
commit dd096e0fda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -248,6 +248,8 @@ class SeriesDetails extends Component {
expandIcon = icons.EXPAND;
}
const fanartUrl = getFanartUrl(images);
return (
<PageContent title={title}>
<PageToolbar>
@ -327,9 +329,11 @@ class SeriesDetails 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>