Bugfix for manga pages without characters

This commit is contained in:
Timothy Warren 2022-06-28 18:57:50 -04:00
parent 501062ac37
commit e8aa2bd42b

View File

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