Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
alihardan committed Jun 11, 2024
1 parent ec3db14 commit f9b1814
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/Http/Resources/GameResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ public function toArray(Request $request): array
{
$types = [];
foreach ($this->games as $game) {
if ($game['dubbed'] == true)
if ($game['dubbed'] ?? false == true)
$types[] = 'dubbed';
if ($game['modified'] == true)
if ($game['modified'] ?? false == true)
$types[] = 'modified';
if ($game['subtitle'] == true)
if ($game['subtitle'] ?? false == true)
$types[] = 'subtitle';
if ($game['iranian'] == true)
if ($game['iranian'] ?? false == true)
$types[] = 'iranian';
}
$types = array_values(array_unique($types));
Expand Down

0 comments on commit f9b1814

Please sign in to comment.