From 5fcc00857c0df134fee53e5f0b8f5321554f9b1d Mon Sep 17 00:00:00 2001 From: Carson Date: Mon, 1 Feb 2021 16:38:25 -0600 Subject: [PATCH] Close #79: Don't call shiny::getCurrentOutputInfo() unless shiny is already loaded --- R/auto.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/auto.R b/R/auto.R index 42256d05..e9aa3bb4 100644 --- a/R/auto.R +++ b/R/auto.R @@ -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)