Don't plot unless width and height are positive

This commit is contained in:
Joe Cheng
2012-07-20 12:05:50 -07:00
parent c635b92991
commit a78ae8ca4a

View File

@@ -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(),