Skip to content

Commit

Permalink
ch: use all() instead of && for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
kennedymwavu committed Mar 10, 2024
1 parent cbf4c97 commit 4d26e3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/assertions.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ assertthat::on_failure(is_handler) <- function(call, env){
}

is_error_handler <- function(x) {
is.function(x) && length(formalArgs(x)) == 3
is_fun <- is.function(x)
has_args <- length(formalArgs(x)) == 3

all(is_fun, has_args)
}

assertthat::on_failure(is_error_handler) <- function(call, env) {
Expand Down

0 comments on commit 4d26e3f

Please sign in to comment.