Skip to content

Commit

Permalink
Fix max week in ff_starters() (ESPN) (#423)
Browse files Browse the repository at this point in the history
* less than OR equal to max week

* update description and news

---------

Co-authored-by: Tan Ho <38083823+tanho63@users.noreply.github.com>
  • Loading branch information
tonyelhabr and tanho63 authored Dec 9, 2023
1 parent 905d038 commit 9c596c2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: ffscrapr
Title: API Client for Fantasy Football League Platforms
Version: 1.4.8.15
Version: 1.4.8.16
Authors@R:
c(person(given = "Tan",
family = "Ho",
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ row per player-team-season (v1.4.8.13) (thanks @john-b-edwards!)
- Bugfix espn `ff_franchises()` to return coalesce of name/nickname (v1.4.8.14)
- Bugfix espn `ff_starters()` to return handle multi-week formats (v1.4.8.15) (#421)
(h/t @tonyelhabr 🤠)
- Bugfix espn `ff_starters()` to return less than or equal to max week (v1.4.8.16)

# ffscrapr 1.4.8

Expand Down
2 changes: 1 addition & 1 deletion R/espn_starters.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ff_starters.espn_conn <- function(conn, weeks = 1:17, ...) {
week_matchup_periods_mapping <- .espn_week_matchup_periods_mapping(settings)
max_week <- .espn_week_checkmax(settings)

run_weeks <- weeks[weeks < max_week]
run_weeks <- weeks[weeks <= max_week]
named_run_weeks <- week_matchup_periods_mapping[run_weeks]

if (length(run_weeks) == 0) {
Expand Down

0 comments on commit 9c596c2

Please sign in to comment.