Skip to content

Commit cc4ff9b

Browse files
committed
Avoid check is geom is passed as ggproto object
1 parent 9f75c34 commit cc4ff9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/annotation.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ annotate <- function(geom, x = NULL, y = NULL, xmin = NULL, xmax = NULL,
4242
ymin = NULL, ymax = NULL, xend = NULL, yend = NULL, ...,
4343
na.rm = FALSE) {
4444

45-
if (geom %in% c("abline", "hline", "vline")) {
45+
if (is.character(geom) && geom %in% c("abline", "hline", "vline")) {
4646
cli::cli_warn(c(
4747
"{.arg geom} must not be {.val {geom}}.",
4848
"i" = "Please use {.fn {paste0('geom_', geom)}} directly instead."

0 commit comments

Comments
 (0)