Skip to content

Commit

Permalink
fallback when constructor call is missing (#6095)
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand authored Sep 16, 2024
1 parent c3dd767 commit d742881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/plot-construction.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ new_layer_names <- function(layer, existing) {
new_name <- layer$name
if (is.null(new_name)) {
# Construct a name from the layer's call
new_name <- call_name(layer$constructor)
new_name <- call_name(layer$constructor) %||% snake_class(layer$geom)

if (new_name %in% existing) {
names <- c(existing, new_name)
Expand Down

0 comments on commit d742881

Please sign in to comment.