Skip to content

Commit

Permalink
refactor: remove redundant isTRUE
Browse files Browse the repository at this point in the history
  • Loading branch information
m-muecke committed Jul 19, 2024
1 parent 074ce87 commit 89548a7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions R/utils.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
is_installed <- function(pkg) {
isTRUE(requireNamespace(pkg, quietly = TRUE))
}

as_tibble <- function(x) {
if (getOption("gleif.use_tibble", TRUE) && is_installed("tibble")) {
if (getOption("gleif.use_tibble", TRUE) &&
requireNamespace("tibble", quietly = TRUE)) {
tibble::as_tibble(x)
} else {
x
Expand Down

0 comments on commit 89548a7

Please sign in to comment.