Skip to content

Commit b122e2a

Browse files
authored
Make sure flip is never NA (#3665)
1 parent 0315dc3 commit b122e2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/utilities.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,8 @@ has_flipped_aes <- function(data, params = list(), main_is_orthogonal = NA,
603603
#' @rdname bidirection
604604
#' @export
605605
flip_data <- function(data, flip = NULL) {
606-
flip <- flip %||% data$flipped_aes[1] %||% FALSE
607-
if (flip) {
606+
flip <- flip %||% any(data$flipped_aes) %||% FALSE
607+
if (isTRUE(flip)) {
608608
names(data) <- switch_orientation(names(data))
609609
}
610610
data

0 commit comments

Comments
 (0)