Skip to content

Commit 937d306

Browse files
committed
be more thorough with the parentheses
1 parent a2ab6df commit 937d306

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/scale-colour.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ scale_colour_discrete <- function(..., palette = NULL, aesthetics = "colour", na
224224

225225
has_old_args <- any(names(enexprs(...)) %in% c("h", "c", "l", "h.start", "direction"))
226226

227-
if (has_old_args || !is.null(type) && is.null(palette)) {
227+
if (has_old_args || (!is.null(type) && is.null(palette))) {
228228
scale <- scale_backward_compatibility(
229229
..., na.value = na.value, scale = type,
230230
aesthetic = "colour", type = "discrete"
@@ -245,7 +245,7 @@ scale_fill_discrete <- function(..., palette = NULL, aesthetics = "fill", na.val
245245

246246
has_old_args <- any(names(enexprs(...)) %in% c("h", "c", "l", "h.start", "direction"))
247247

248-
if (has_old_args || !is.null(type) && is.null(palette)) {
248+
if (has_old_args || (!is.null(type) && is.null(palette))) {
249249
scale <- scale_backward_compatibility(
250250
..., na.value = na.value, scale = type,
251251
aesthetic = "fill", type = "discrete"

0 commit comments

Comments
 (0)