Skip to content

Commit a619d58

Browse files
committed
add req statement so that when srv_teal_transform_data returns NULL you see error from original teal_data
1 parent 67f3265 commit a619d58

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

R/tm_t_crosstable.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ tm_t_crosstable <- function(label = "Cross Table",
143143
pre_output = NULL,
144144
post_output = NULL,
145145
basic_table_args = teal.widgets::basic_table_args(),
146-
decorators = list(default = teal_transform_module())) {
146+
decorators = NULL) {
147147
message("Initializing tm_t_crosstable")
148148

149149
# Requires Suggested packages
@@ -167,7 +167,7 @@ tm_t_crosstable <- function(label = "Cross Table",
167167
checkmate::assert_multi_class(pre_output, c("shiny.tag", "shiny.tag.list", "html"), null.ok = TRUE)
168168
checkmate::assert_multi_class(post_output, c("shiny.tag", "shiny.tag.list", "html"), null.ok = TRUE)
169169
checkmate::assert_class(basic_table_args, classes = "basic_table_args")
170-
checkmate::assert_list(decorators, "teal_transform_module")
170+
checkmate::assert_list(decorators, "teal_transform_module", null.ok = TRUE)
171171
# End of assertions
172172

173173
# Make UI args
@@ -413,6 +413,7 @@ srv_t_crosstable <- function(id, data, reporter, filter_panel_api, label, x, y,
413413

414414
table_r <- reactive({
415415
req(iv_r()$is_valid())
416+
req(output_q())
416417
decorated_output_q()[["table"]]
417418
})
418419

0 commit comments

Comments
 (0)