Skip to content

Commit

Permalink
Return early if package is not loaded
Browse files Browse the repository at this point in the history
Avoids problems if package is not installed
  • Loading branch information
lionel- committed Oct 22, 2019
1 parent 5ea544c commit afcf95e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions R/rlang.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ downstream_deps <- list(
)

check_downstream_dep <- function(dep, pkg) {
if (!isNamespaceLoaded(pkg)) {
setHook(
packageEvent(pkg, "onLoad"),
function(...) check_downstream_dep(dep, pkg)
)
return()
}

min <- dep[["min"]]
from <- dep[["from"]]
stopifnot(
Expand Down

0 comments on commit afcf95e

Please sign in to comment.