Skip to content

Commit 1a8cfe3

Browse files
committed
skip unlabelled_uneval class
1 parent e7f05ba commit 1a8cfe3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

R/labels.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,16 @@ setup_plot_labels <- function(plot, layers, data) {
2424
# Find labels from every layer
2525
for (i in seq_along(layers)) {
2626
layer <- layers[[i]]
27-
exclude <- names(layer$aes_params)
27+
2828
mapping <- layer$computed_mapping
29+
if (inherits(mapping, "unlabelled_uneval")) {
30+
next
31+
}
32+
2933
mapping <- strip_stage(mapping)
3034
mapping <- strip_dots(mapping, strip_pronoun = TRUE)
35+
36+
exclude <- names(layer$aes_params)
3137
mapping <- mapping[setdiff(names(mapping), exclude)]
3238

3339
# Acquire default labels

0 commit comments

Comments
 (0)