mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-29 03:00:45 -04:00
Don't plot unless width and height are positive
This commit is contained in:
@@ -34,6 +34,9 @@ reactivePlot <- function(func, width='auto', height='auto', ...) {
|
||||
if (height == 'auto')
|
||||
height <- shinyapp$session$get(paste0('.shinyout_', name, '_height'));
|
||||
|
||||
if (width <= 0 || height <= 0)
|
||||
return(NULL)
|
||||
|
||||
do.call(png, c(args, filename=png.file, width=width, height=height))
|
||||
tryCatch(
|
||||
func(),
|
||||
|
||||
Reference in New Issue
Block a user