Skip to content

Commit a34cdb4

Browse files
committed
Don't pass NULLs to find_scale()
Closes #2599
1 parent 97dcbb1 commit a34cdb4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

R/scales-.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ scales_add_defaults <- function(scales, data, aesthetics, env) {
9797
if (is.null(new_aesthetics)) return()
9898

9999
datacols <- lapply(aesthetics[new_aesthetics], rlang::eval_tidy, data = data)
100+
datacols <- compact(datacols)
100101

101102
for (aes in names(datacols)) {
102103
scales$add(find_scale(aes, datacols[[aes]], env))

0 commit comments

Comments
 (0)