Skip to content

Commit e169794

Browse files
committed
stabilise missingness detection for 2D structures
1 parent 593f326 commit e169794

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/scale-.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ ScaleDiscrete <- ggproto("ScaleDiscrete", Scale,
13311331
vec_slice(pal, match(as.character(x), limits, nomatch = vec_size(pal)))
13321332

13331333
if (!is.na(na_value)) {
1334-
vec_slice(pal_match, is.na(x)) <- na_value
1334+
vec_slice(pal_match, vec_detect_missing(x)) <- na_value
13351335
}
13361336
pal_match
13371337
},

0 commit comments

Comments
 (0)