Skip to content

Commit a536ac9

Browse files
zorroozclaude
andcommitted
fix: apply ._strip_nulls to user ... in ._scale_xy_impl
scale_x/scale_y pass user ... through to the scale fun via c(args, list(...)). If extra_args contains NULL values they can trigger the same guide=none bug that .scale_colour_fun had. Also replaces the inline NULL-strip on line 298 with the now- centralized ._strip_nulls helper (code review finding #2). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5b5f01b commit a536ac9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

R/scale.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,9 @@ NULL
295295
if (discrete && reverse && is.null(limits)) {
296296
args$limits <- rev
297297
}
298-
args <- args[!vapply(args, is.null, logical(1))]
299-
plot@gg <- plot@gg + do.call(scale_fun, c(args, list(...)))
298+
args <- ._strip_nulls(args)
299+
extra_args <- ._strip_nulls(list(...))
300+
plot@gg <- plot@gg + do.call(scale_fun, c(args, extra_args))
300301
plot
301302
}
302303

0 commit comments

Comments
 (0)