Skip to content

Commit 91b9bd6

Browse files
committed
fix dot-paren check in pipe
1 parent 8963e61 commit 91b9bd6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

R/bpipe.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,9 @@ pipe_impl <- function(pipe_left_arg,
388388
(length(as.character(pipe_right_arg[[1]]))==1) &&
389389
(as.character(pipe_right_arg[[1]])=="function")
390390
# special-case .() on RHS
391-
dot_paren <- (is.call(pipe_right_arg) && as.character(pipe_right_arg[[1]])==".")
391+
dot_paren <- is.call(pipe_right_arg) &&
392+
(length(as.character(pipe_right_arg[[1]]))==1) &&
393+
(as.character(pipe_right_arg[[1]])[[1]]==".")
392394
# check for right-apply situations
393395
if(is.function(pipe_right_arg) ||
394396
is_name || qualified_name ||

0 commit comments

Comments
 (0)