Skip to content

Commit de7171d

Browse files
committed
use vapply instead of sapply
1 parent 8ee2055 commit de7171d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/library/tools/R/license.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,12 @@ function(x)
614614
stringsAsFactors = FALSE)
615615
}
616616

617-
sapply(expansions, `[[`, "SPDX") |>
617+
vapply(
618+
expansions, FUN.VALUE = character(1),
619+
FUN = function(z) {
620+
paste(z[["SPDX"]], collapse = " OR ")
621+
}
622+
) |>
618623
paste(collapse = " OR ") -> spdx
619624
## Replace expansions by their labels from the license db.
620625
## (As these are unique, we can always easily get the full

0 commit comments

Comments
 (0)