Skip to content

Commit

Permalink
fixed undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ametel01 committed Feb 2, 2024
1 parent fab5af9 commit e3b595a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/frontend/src/components/modals/PlanetOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ export default function PlanetModal({ planetId, image, position }: Props) {
<h6 key={key}>
{key}:{' '}
<Value>
{numberWithCommas(actualShips[key as keyof ShipsLevels])}
{numberWithCommas(
actualShips ? actualShips[key as keyof ShipsLevels] : 0
)}
</Value>
</h6>
))}
Expand Down

0 comments on commit e3b595a

Please sign in to comment.