diff --git a/R/0_helpers.R b/R/0_helpers.R index 1f92a7f7..c159c2b6 100644 --- a/R/0_helpers.R +++ b/R/0_helpers.R @@ -12,7 +12,7 @@ date <- Sys.Date() } - if (class(date) != "Date") { + if (!inherits(date, "Date")) { date <- as.Date(date) } diff --git a/R/mfl_players.R b/R/mfl_players.R index 1ccc01e2..ee527f9e 100644 --- a/R/mfl_players.R +++ b/R/mfl_players.R @@ -18,7 +18,7 @@ #' @export mfl_players <- function(conn = NULL) { - if (!is.null(conn) && class(conn) != "mfl_conn") { + if (!is.null(conn) && !inherits(conn, "mfl_conn")) { stop("conn must be generated by 'mfl_connect()' and have type 'mfl_conn'") }