Skip to content

Commit

Permalink
Handle non-primitive aes_default
Browse files Browse the repository at this point in the history
  • Loading branch information
yutannihilation committed May 11, 2024
1 parent f006c02 commit fe57c5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/gghighlight.R
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,8 @@ get_default_aes_param <- function(aes_param_name, geom, mapping) {

# if the geom has default value and is NA, use NA
if (aes_param_name %in% names(non_null_default_aes) &&
is.na(non_null_default_aes[[aes_param_name]])) {
# is.na() cannot handle non primitive objects (e.g. a quosure)
rlang::is_na(non_null_default_aes[[aes_param_name]])) {
return(NA)
}

Expand Down

0 comments on commit fe57c5d

Please sign in to comment.