Skip to content

Commit 4387ed7

Browse files
authored
don't bother subsetting labels (#6745)
1 parent d7be1d1 commit 4387ed7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

R/layer.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -972,10 +972,8 @@ normalise_label <- function(label) {
972972
return(NULL)
973973
}
974974
if (obj_is_list(label)) {
975-
# Ensure that each element in the list has length 1
975+
# Ensure no elements are empty
976976
label[lengths(label) == 0] <- ""
977-
truncate <- !vapply(label, is.call, logical(1)) # Don't mess with call/formula
978-
label[truncate] <- lapply(label[truncate], `[`, 1)
979977
}
980978
if (is.expression(label)) {
981979
# Classed expressions, when converted to lists, retain their class.

0 commit comments

Comments
 (0)