Skip to content

Commit

Permalink
use check_object()
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Oct 22, 2024
1 parent d515141 commit 0c47e9d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions R/colour-manip.R
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,7 @@ col_saturate.scales_pal <- function(col, amount = 10) {
}

wrap_col_adjustment <- function(inner, outer, args, call = caller_env()) {
if (!is_colour_pal(inner)) {
cli::cli_abort("palette must be a {.field colour} palette.", call = call)
}
check_object(inner, is_colour_pal, "a {.field colour} palette")
force_all(inner, outer, args)
fun <- function(...) inject(outer(inner(...), !!!args))
if (is_discrete_pal(inner)) {
Expand Down

0 comments on commit 0c47e9d

Please sign in to comment.