Bugfix for manga pages without characters
Some checks failed
timw4mail/HummingBirdAnimeClient/pipeline/head There was a failure building this commit

This commit is contained in:
Timothy Warren 2022-06-28 18:57:50 -04:00
parent 92e283bdbe
commit 6cea9e47f0

View File

@ -54,12 +54,15 @@ final class MangaTransformer extends AbstractTransformer
} }
$details = $rawCharacter['character']; $details = $rawCharacter['character'];
if (array_key_exists($details['id'], $characters[$type]))
{
$characters[$type][$details['id']] = [ $characters[$type][$details['id']] = [
'image' => $details['image']['original']['url'], 'image' => $details['image']['original']['url'],
'name' => $details['names']['canonical'], 'name' => $details['names']['canonical'],
'slug' => $details['slug'], 'slug' => $details['slug'],
]; ];
} }
}
foreach (array_keys($characters) as $type) foreach (array_keys($characters) as $type)
{ {