I'm running into an issue where is_in_shiny() can return NULL. Can I suggest the following change to the function?
is_in_shiny <- function() {
res <- FALSE
tmp <- try(utils::getFromNamespace(".globals", "shiny")$appState,
silent = TRUE)
if (!inherits(tmp, "try-error") && !is.null(tmp))
res <- TRUE
if (is.null(res))
res <- FALSE
res
}
I'm running into an issue where
is_in_shiny()
can returnNULL
. Can I suggest the following change to the function?