Skip to content
4 changes: 3 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@
if (checkmate::test_names(names(decorators))) {
lapply(decorators, list)
} else {
list(default = decorators)
named <- which(names(decorators) != "")
unnamed <- setdiff(1:length(decorators), named)

Check warning on line 421 in R/utils.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=R/utils.R,line=421,col=26,[seq_linter] 1:length(...) is likely to be wrong in the empty edge case. Use seq_along(...) instead.
c(list(default = decorators[unnamed]), lapply(decorators[named], list))
}
} else {
decorators
Expand Down
Loading