Skip to content

Commit

Permalink
Close #79: Don't call shiny::getCurrentOutputInfo() unless shiny is a…
Browse files Browse the repository at this point in the history
…lready loaded
  • Loading branch information
cpsievert committed Feb 1, 2021
1 parent c09c05d commit 5fcc008
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/auto.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ auto_resolve_theme <- function(theme) {
# ------------------------------------------------------------

shiny_output_info <- function() {
if (!is_installed("shiny")) return(NULL)
if (!"shiny" %in% loadedNamespaces()) return(NULL)
info <- tryNULL(shiny::getCurrentOutputInfo())
# Return early if we're not in any output context
if (is.null(info)) return(NULL)
Expand Down

0 comments on commit 5fcc008

Please sign in to comment.