From 7b2badedee76587a7d81303a205188e74d8079ba Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Tue, 25 Oct 2022 16:33:14 -0500 Subject: [PATCH] Fix for dev purrr pluck() no longer replaces 0-length vectors with the .default value so we just check for 0-length input rather than NULL --- R/get_variants.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/get_variants.R b/R/get_variants.R index 19ba777..9fda027 100644 --- a/R/get_variants.R +++ b/R/get_variants.R @@ -448,12 +448,11 @@ get_variants_by_gene_name <- function(gene_name = NULL, verbose = FALSE, warning #' @keywords internal get_variants_by_efo_trait <- function(efo_trait = NULL, verbose = FALSE, warnings = TRUE, page_size = 20L) { - if(rlang::is_null(efo_trait)) + if(length(efo_trait) == 0) return(variants()) assertthat::assert_that( is.character(efo_trait), - length(efo_trait) > 0, assertthat::noNA(efo_trait)) resource_urls <- sprintf("%s%s", "/singleNucleotidePolymorphisms/search/findByEfoTrait?efoTrait=",