Ensure that list items always have some sort of cover image
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good Details

This commit is contained in:
Timothy Warren 2022-01-08 13:04:24 -05:00
parent 962bb32f96
commit 1b28f03506
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ final class AnimeListTransformer extends AbstractTransformer {
'titles' => $titles,
'slug' => $anime['slug'],
'show_type' => (string)StringType::from($anime['subtype'])->upperCaseFirst(),
'cover_image' => $anime['posterImage']['views'][1]['url'],
'cover_image' => $anime['posterImage']['views'][1]['url'] ?? '/public/images/placeholder.png',
'genres' => $genres,
'streaming_links' => $streamingLinks,
],