Skip to content

Commit c850c6d

Browse files
committed
fix is.guide() -> inherits()
1 parent 91a6d25 commit c850c6d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/guides-.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ NULL
6868
#' }
6969
guides <- function(...) {
7070
args <- list2(...)
71-
if (length(args) > 0) {
72-
if (is.list(args[[1]]) && !is.guide(args[[1]])) args <- args[[1]]
73-
args <- rename_aes(args)
7471
# If there are no guides do nothing
7572
if (length(args) == 0) {
7673
return(NULL)
7774
}
7875

76+
if (is.list(args[[1]]) && !inherits(args[[1]], "guide")) args <- args[[1]]
77+
args <- rename_aes(args)
78+
7979
idx_false <- vapply(args, isFALSE, FUN.VALUE = logical(1L))
8080
if (isTRUE(any(idx_false))) {
8181
deprecate_warn0("3.3.4", "guides(`<scale>` = 'cannot be `FALSE`. Use \"none\" instead')")

0 commit comments

Comments
 (0)