Skip to content

Commit

Permalink
Handle playlist not containing track data
Browse files Browse the repository at this point in the history
  • Loading branch information
mintopia authored Dec 28, 2024
1 parent 0e1f1bb commit 8620ae7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Models/Party.php
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,9 @@ protected function backfillUpcomingSongs()
->toArray();

$tracks = array_filter($tracks, function ($track) use ($existingIds) {
if ($track->track === null) {
return false;
}
return !in_array($track->track->id, $existingIds);
});

Expand Down

0 comments on commit 8620ae7

Please sign in to comment.