Skip to content

Commit a2475fd

Browse files
committed
convert check_labeller() to validate_labeller()
1 parent 7fb5760 commit a2475fd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

R/facet-grid-.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ facet_grid <- function(rows = NULL, cols = NULL, scales = "fixed",
187187
facets_list <- grid_as_facets_list(rows, cols)
188188

189189
# Check for deprecated labellers
190-
check_labeller(labeller)
190+
labeller <- validate_labeller(labeller)
191191

192192
ggproto(NULL, FacetGrid,
193193
shrink = shrink,

R/facet-wrap.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ facet_wrap <- function(facets, nrow = NULL, ncol = NULL, scales = "fixed",
188188
)
189189

190190
# Check for deprecated labellers
191-
check_labeller(labeller)
191+
labeller <- validate_labeller(labeller)
192192

193193
# Flatten all facets dimensions into a single one
194194
facets <- compact_facets(facets)

R/labeller.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,13 +578,13 @@ assemble_strips <- function(grobs, theme, horizontal = TRUE, clip) {
578578
}
579579

580580
# Reject old school labeller
581-
check_labeller <- function(labeller) {
581+
validate_labeller <- function(labeller) {
582582

583583
labeller <- match.fun(labeller)
584584
is_deprecated <- all(c("variable", "value") %in% names(formals(labeller)))
585585

586586
if (!is_deprecated) {
587-
return(invisible())
587+
return(labeller)
588588
}
589589

590590
lifecycle::deprecate_stop(

0 commit comments

Comments
 (0)