Skip to content

Commit

Permalink
Merge pull request #233 from moonstream-to/desktop-playing
Browse files Browse the repository at this point in the history
undefined stat fix
  • Loading branch information
Anton-Mushnin authored Apr 3, 2024
2 parents 7f61009 + b80dc68 commit 82e6fc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/components/playing/DetailedStat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const DetailedStat = ({ stats, isPitcher }: { stats: PlayerStats; isPitcher: boo
<div className={styles.container}>
<div className={styles.header}>season statistics</div>
<div className={styles.dataTable}>
{isPitcher && (
{isPitcher && stats.points_data.pitching_data && (
<>
<DataRow label={"at bats"} data={String(pitcherAtBatsCount(stats))} />
<DataRow label={"record"} data={pitcherRecord(stats)} />
Expand All @@ -97,7 +97,7 @@ const DetailedStat = ({ stats, isPitcher }: { stats: PlayerStats; isPitcher: boo
/>
</>
)}
{!isPitcher && (
{!isPitcher && stats.points_data.batting_data && (
<>
<DataRow label={"at bats"} data={String(stats.points_data.batting_data.at_bats)} />
<DataRow label={"record"} data={batterRecord(stats)} />
Expand Down

0 comments on commit 82e6fc8

Please sign in to comment.