Skip to content

Commit

Permalink
Use inherits() instead of != for class
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasilge committed Nov 17, 2022
1 parent dca81e2 commit 4d80d7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ checkarg_include_embedded <-
checkarg_col_types <-
function(col_types){
if(is.null(col_types)){return()}
if(class(col_types) != "col_spec"){
if(!inherits(col_types, "col_spec")){
rlang::abort(
c("Error in argument `col_types`",
"Must be a `col_spec` object from `readr::cols()`")
Expand Down

0 comments on commit 4d80d7b

Please sign in to comment.