igroffman commited on
Commit
6886744
·
verified ·
1 Parent(s): 339eb91

Update app.R

Browse files
Files changed (1) hide show
  1. app.R +1 -1
app.R CHANGED
@@ -1259,7 +1259,7 @@ create_pitcher_pdf <- function(game_df, pitcher_name, output_file, pitch_colors)
1259
 
1260
  if (is.null(dfp) || nrow(dfp) == 0) {
1261
  grDevices::pdf(output_file, width = 11, height = 8.5)
1262
- on.exit(on.exit(try(grDevices::dev.off(), silent = TRUE), add = TRUE)
1263
  grid::grid.newpage()
1264
  grid::grid.text(paste("No data for", pitcher_name),
1265
  x = 0.5, y = 0.5,
 
1259
 
1260
  if (is.null(dfp) || nrow(dfp) == 0) {
1261
  grDevices::pdf(output_file, width = 11, height = 8.5)
1262
+ on.exit(try(grDevices::dev.off(), silent = TRUE), add = TRUE)
1263
  grid::grid.newpage()
1264
  grid::grid.text(paste("No data for", pitcher_name),
1265
  x = 0.5, y = 0.5,