Skip to content

Commit 9eb9310

Browse files
committed
don't cast bquote() to lambda functions
1 parent 6d01b3c commit 9eb9310

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/scale-.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1454,5 +1454,6 @@ trans_support_nbreaks <- function(trans) {
14541454
}
14551455

14561456
allow_lambda <- function(x) {
1457-
if (is_formula(x, lhs = FALSE)) as_function(x) else x
1457+
# we check the 'call' class to prevent interpreting `bquote()` calls as a function
1458+
if (is_formula(x, lhs = FALSE) && !inherits(x, "call")) as_function(x) else x
14581459
}

0 commit comments

Comments
 (0)