mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-03 19:25:15 -05:00
fail when attempting to insert a shiny app into a cached chunk
This commit is contained in:
2
R/app.R
2
R/app.R
@@ -240,6 +240,8 @@ knit_print.shiny.appobj <- function(x, ...) {
|
||||
"Shiny applications not supported in static R Markdown documents")
|
||||
}
|
||||
else {
|
||||
if (isTRUE(as.logical(knitr::opts_current$get("cache"))))
|
||||
stop("Shiny applications cannot be used in cached chunks.")
|
||||
path <- addSubApp(x)
|
||||
output <- tags$iframe(src=path, width=width, height=height,
|
||||
class="shiny-frame")
|
||||
|
||||
Reference in New Issue
Block a user