Skip to content

Commit

Permalink
Update R/utils.R
Browse files Browse the repository at this point in the history
Co-authored-by: Carl A. B. Pearson <pearsonca@users.noreply.github.com>
  • Loading branch information
seabbs and pearsonca authored Jan 3, 2024
1 parent b9455de commit dbd88dc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,8 @@ enw_example <- function(type = c(
#' )
coerce_date <- function(dates) {
if (is.null(dates)) {
return(data.table::as.IDate(.Date(numeric())))
return(data.table::as.IDate(c()))

Check warning on line 202 in R/utils.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/utils.R,line=202,col=33,[unnecessary_concatenation_linter] Unneeded concatenation without arguments. Replace the "c" call by NULL or, whenever possible, vector() seeded with the correct type and/or length.
}

if (length(dates) == 0) {
return(data.table::as.IDate(dates))
}
Expand Down

0 comments on commit dbd88dc

Please sign in to comment.