Skip to content

Commit

Permalink
typo in check for NULL grob lol
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcaseb committed Nov 15, 2024
1 parent 3f2cbd7 commit 7ed406d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/build_grobs.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build_grobs <- function(i, alpha, colour, data, type = c("teams", "headshots", "
image_to_read <- headshot_map$headshot_nfl[headshot_map$gsis_id == gsis]
if(length(image_to_read) == 0) image_to_read <- na_headshot()
}
if (is.na(make_null)){
if (isTRUE(make_null)){
grid <- grid::nullGrob()
} else if (is.null(alpha)) {
img <- reader_function(image_to_read)
Expand Down
2 changes: 1 addition & 1 deletion R/theme-elements.R
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ axisImageGrob <- function(i, label, alpha, colour, x, y, hjust, vjust,
image_to_read <- headshot_map$headshot_nfl[headshot_map$gsis_id == gsis]
if(length(image_to_read) == 0) image_to_read <- na_headshot()
}
if (is.na(make_null)){
if (isTRUE(make_null)){
return(grid::nullGrob())
} else if (is.null(alpha[i])) {
img <- reader_function(image_to_read)
Expand Down

0 comments on commit 7ed406d

Please sign in to comment.