diff --git a/R/modules.R b/R/modules.R index 7e39e44b60..76dea53d68 100644 --- a/R/modules.R +++ b/R/modules.R @@ -264,7 +264,7 @@ module <- function(label = "module", } checkmate::assert_list(transformers, types = "teal_transform_module") transformer_datanames <- unlist(lapply(transformers, attr, "datanames")) - combined_datanames <- if (identical(datanames, "all") || identical(transformer_datanames, "all")) { + combined_datanames <- if (identical(datanames, "all") || any(sapply(transformer_datanames, identical, "all"))) { "all" } else { union(datanames, transformer_datanames) diff --git a/tests/testthat/test-modules.R b/tests/testthat/test-modules.R index abd9c8f144..594e801d45 100644 --- a/tests/testthat/test-modules.R +++ b/tests/testthat/test-modules.R @@ -534,7 +534,7 @@ testthat::test_that("module datanames is appended by its transformers datanames" testthat::expect_identical(out$datanames, c("c", "a", "b")) }) -testthat::test_that("module datanames is set to 'all' if transformer $datanames is 'all'", { +testthat::test_that("module datanames is set to 'all' if any transformer $datanames is 'all'", { transformer_w_datanames <- teal_transform_module( ui = function(id) NULL, server = function(id, data) {