Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dumbmatter committed May 25, 2024
1 parent 7ccc359 commit 278a1b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/ui/views/FreeAgents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ const FreeAgents = ({
"Negotiate",
]);

const playerInfoSeason =
freeAgencySeason +
(season === "current" && phase < PHASE.FREE_AGENCY ? 1 : 0);

const rows = players.map(p => {
return {
key: p.pid,
Expand All @@ -159,6 +163,7 @@ const FreeAgents = ({
firstName: p.firstName,
firstNameShort: p.firstNameShort,
lastName: p.lastName,
season: playerInfoSeason,
}),
p.ratings.pos,
p.age,
Expand Down Expand Up @@ -279,10 +284,7 @@ const FreeAgents = ({
"compare_players",
players
.slice(0, 5)
.map(
p =>
`${p.pid}-${freeAgencySeason + (season === "current" && phase < PHASE.FREE_AGENCY ? 1 : 0)}-r`,
)
.map(p => `${p.pid}-${playerInfoSeason}-r`)
.join(","),
])}
>
Expand Down
2 changes: 1 addition & 1 deletion src/worker/views/freeAgents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const updateFreeAgents = async (
],
ratings: ["ovr", "pot", "skills", "pos"],
stats: freeAgentStats,
season: g.get("season"),
season: season === "current" ? g.get("season") : freeAgencySeason,
showNoStats: true,
showRookies: true,
fuzz: true,
Expand Down

0 comments on commit 278a1b7

Please sign in to comment.