Skip to content

Commit 3fc9309

Browse files
committed
Use scalar operator in if condition
1 parent 79e8b45 commit 3fc9309

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/position-dodge.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ PositionDodge <- ggproto("PositionDodge", Position,
108108
},
109109

110110
setup_data = function(self, data, params) {
111-
if (!"x" %in% names(data) & all(c("xmin", "xmax") %in% names(data))) {
111+
if (!"x" %in% names(data) && all(c("xmin", "xmax") %in% names(data))) {
112112
data$x <- (data$xmin + data$xmax) / 2
113113
}
114114
data

0 commit comments

Comments
 (0)