Skip to content

Commit

Permalink
Fix off by one
Browse files Browse the repository at this point in the history
  • Loading branch information
dumbmatter committed Oct 11, 2024
1 parent 51335f1 commit 8dd5a41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Add blown saves (BS) and holds (HLD)
- confirm exhibition game works
- show decision in player game log (similar to box score, maybe reuse code form BoxScoreRow.football)
- sort
- off by one, why is box score working correctly then?
- no decision column for position players
- blog

Expand Down
5 changes: 4 additions & 1 deletion src/worker/views/playerGameLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,11 @@ const updatePlayerGameLog = async (
for (const key of extraBaseballStats) {
gameStats.seasonStats[key] = p.seasonStats[key];
gameStats[key] = p[key];
if (gameStats[key] !== undefined) {
if (gameStats[key] > 0) {
showDecisionColumn = true;

// seasonStats is from before game, so add to reflect after game
gameStats.seasonStats[key] += gameStats[key];
}
}
}
Expand Down

0 comments on commit 8dd5a41

Please sign in to comment.