Spaces:
Running
Running
Update app.R
Browse files
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(
|
| 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,
|