Skip to content

Commit

Permalink
make sure no empty character is returned
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 12, 2023
1 parent bebc889 commit 30bdcc7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions R/check_if_installed.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ check_if_installed <- function(package,
minimum_version <- .safe(.get_dep_version(dep = package))
}

# we may have values for minimum_version that cannot be tested on R old-release
if (getRversion() <= "4.1.0") {
minimum_version <- NULL
}

## Test
if (!all(is_installed)) {
# only keep not-installed packages
Expand Down Expand Up @@ -168,5 +163,9 @@ print.check_if_installed <- function(x, ...) {
if (all(is.na(out))) {
out <- NULL
}
unlist(out)
out <- unlist(out)
if (!length(out)) {
out <- NULL
}
out
}

0 comments on commit 30bdcc7

Please sign in to comment.