Skip to content

Commit

Permalink
Fix badges returned as null
Browse files Browse the repository at this point in the history
  • Loading branch information
andyksaw committed Nov 2, 2024
1 parent c4180ff commit 053cab0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Domains/Badges/UseCases/GetBadges.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function execute(MinecraftPlayer $player): Collection
return collect();
}

$badges = $account->badges;
$badges = $account->badges ?: collect();
$accountAgeInYears = $account->created_at->diffInYears(now());
$accountAgeInYears = number_format((float)$accountAgeInYears, decimals: 2);

Expand Down

0 comments on commit 053cab0

Please sign in to comment.