From 7ed406db3036e61defd8304afac2854e49ea2df9 Mon Sep 17 00:00:00 2001 From: mrcaseb Date: Fri, 15 Nov 2024 16:08:38 +0100 Subject: [PATCH] typo in check for NULL grob lol --- R/build_grobs.R | 2 +- R/theme-elements.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/build_grobs.R b/R/build_grobs.R index 8042627..f80403d 100644 --- a/R/build_grobs.R +++ b/R/build_grobs.R @@ -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) diff --git a/R/theme-elements.R b/R/theme-elements.R index e9a5579..0509e07 100644 --- a/R/theme-elements.R +++ b/R/theme-elements.R @@ -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)