Skip to content

Commit

Permalink
don't throw validation messages unnecessarily (#901)
Browse files Browse the repository at this point in the history
During rendering TLG-Catalog I noticed that each shiny app throws a
message about `data` argument in the reporter previewer module. This fix
aim to silent unnecessary messages


https://github.com/insightsengineering/tlg-catalog/actions/runs/5888144351/job/15968763355
  • Loading branch information
pawelru authored Aug 24, 2023
1 parent eed93d7 commit 17fb575
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# teal 0.14.0.9003

### Miscellaneous

* Enhance a `module` validation checks so that it won't throw messages about `data` argument unnecessarily.

# teal 0.14.0

### New features
Expand Down
2 changes: 1 addition & 1 deletion R/modules.R
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ module <- function(label = "module",
)
}

if (!is.element("data", server_formals)) {
if (!is.element("data", server_formals) && !is.null(datanames)) {
message(sprintf("module \"%s\" server function takes no data so \"datanames\" will be ignored", label))
datanames <- NULL
}
Expand Down

0 comments on commit 17fb575

Please sign in to comment.