Account for missing genres in anime collection

This commit is contained in:
Timothy Warren 2018-10-11 16:40:51 -04:00
parent a9acf23a15
commit 7b765c6d0b

View File

@ -130,7 +130,12 @@ final class AnimeCollection extends Collection {
foreach($rows as &$row)
{
$row['genres'] = $genres[$row['hummingbird_id']];
$id = $row['hummingbird_id'];
$row['genres'] = array_key_exists($id, $genres)
? $genres[$id]
: [];
sort($row['genres']);
}