Skip to content

Commit 3eded4f

Browse files
teunbrandthomasp85
andauthored
Apply suggestions from code review
Co-authored-by: Thomas Lin Pedersen <[email protected]>
1 parent f7ce644 commit 3eded4f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/scale-colour.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ scale_colour_continuous <- function(..., palette = NULL, aesthetics = "colour",
9292

9393
has_old_args <- any(names(enexprs(...)) %in% c("low", "high"))
9494

95-
if (has_old_args || !is.null(type) && is.null(palette)) {
95+
if (has_old_args || (!is.null(type) && is.null(palette))) {
9696
scale <- scale_backward_compatibility(
9797
..., guide = guide, na.value = na.value, scale = type,
9898
aesthetic = "colour", type = "continuous"
@@ -114,7 +114,7 @@ scale_fill_continuous <- function(..., palette = NULL, aesthetics = "fill", guid
114114

115115
has_old_args <- any(names(enexprs(...)) %in% c("low", "high"))
116116

117-
if (has_old_args || !is.null(type) && is.null(palette)) {
117+
if (has_old_args || (!is.null(type) && is.null(palette))) {
118118
scale <- scale_backward_compatibility(
119119
..., guide = guide, na.value = na.value, scale = type,
120120
aesthetic = "fill", type = "continuous"
@@ -136,7 +136,7 @@ scale_colour_binned <- function(..., palette = NULL, aesthetics = "colour", guid
136136

137137
has_old_args <- any(names(enexprs(...)) %in% c("low", "high"))
138138

139-
if (has_old_args || !is.null(type) && is.null(palette)) {
139+
if (has_old_args || (!is.null(type) && is.null(palette))) {
140140
scale <- scale_backward_compatibility(
141141
..., guide = guide, na.value = na.value, scale = type,
142142
aesthetic = "colour", type = "binned"
@@ -157,7 +157,7 @@ scale_fill_binned <- function(..., palette = NULL, aesthetics = "fill", guide =
157157
type = getOption("ggplot2.binned.fill")) {
158158
has_old_args <- any(names(enexprs(...)) %in% c("low", "high"))
159159

160-
if (has_old_args || !is.null(type) && is.null(palette)) {
160+
if (has_old_args || (!is.null(type) && is.null(palette))) {
161161
scale <- scale_backward_compatibility(
162162
..., guide = guide, na.value = na.value, scale = type,
163163
aesthetic = "fill", type = "binned"

0 commit comments

Comments
 (0)