From 3131ac8cf84163a58bb31284da0834a97991c0f3 Mon Sep 17 00:00:00 2001 From: Jakob Eschler Date: Mon, 14 Oct 2024 19:16:16 +0200 Subject: [PATCH] refactor changes --- R/mfl_league.R | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/R/mfl_league.R b/R/mfl_league.R index e01aa715..a2efb009 100644 --- a/R/mfl_league.R +++ b/R/mfl_league.R @@ -53,15 +53,12 @@ ff_league.mfl_conn <- function(conn) { } .mfl_league_type <- function(league_endpoint) { - x <- league_endpoint[["keeperType"]] - if (is.null(x)) { - x <- league_endpoint[["loadRosters"]] + x <- league_endpoint[["load_rosters"]] + if (x == "contest") return(x) - if (x != "contest") { - return(NA_character_) - } - } + x <- league_endpoint[["keeperType"]] if (x == "none") x <- "redraft" + x }