diff --git a/R/ConceptSets.R b/R/ConceptSets.R index 2bd75ce98..365d05709 100644 --- a/R/ConceptSets.R +++ b/R/ConceptSets.R @@ -20,7 +20,7 @@ extractConceptSetsSqlFromCohortSql <- function(cohortSql) { } sql <- gsub("with primary_events.*", "", cohortSql) - if (is.null(sql) || isTRUE(nchar(sql) < 1) || is.na(nchar(sql)) || is.nan(nchar(sql))) { + if (is.null(sql) || length(nchar(sql)) == 0 || is.na(nchar(sql)) || is.nan(nchar(sql))) { return(tidyr::tibble()) } # Find opening and closing parentheses: