Skip to content

Commit

Permalink
Prerender shiny rmd in separate environment
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie committed Aug 19, 2021
1 parent 5952bb6 commit 971e0ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/shiny_prerendered.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,12 @@ shiny_prerendered_html <- function(input_rmd, render_args) {

# prerender if necessary
if (prerender) {
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)

# execute the render
args <- merge_lists(list(input = input_rmd), render_args)
rendered_html <- do.call(render, args)
}

Expand Down

0 comments on commit 971e0ab

Please sign in to comment.