From 75a52de1d68c5f6ecdca137c296d6823e00f1c17 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Wed, 18 Aug 2021 15:26:43 -0400 Subject: [PATCH] Use global envir for prerender if an envir was not provided --- R/shiny_prerendered.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/shiny_prerendered.R b/R/shiny_prerendered.R index 0312cab9b7..c09cc9c55d 100644 --- a/R/shiny_prerendered.R +++ b/R/shiny_prerendered.R @@ -107,7 +107,7 @@ shiny_prerendered_html <- function(input_rmd, render_args) { args <- merge_lists(list(input = input_rmd), render_args) # force prerender to execute in separate environment to ensure that # running w/ prerender step is equivalent to running the prerendered app - args$envir <- new.env(parent = args$envir) + args$envir <- new.env(parent = args$envir %||% globalenv()) # execute the render rendered_html <- do.call(render, args)