Skip to content

Commit 63e809e

Browse files
committed
add req statement so that when srv_teal_transform_data returns NULL you see error from original teal_data
1 parent a2cebfc commit 63e809e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/tm_g_bivariate.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ tm_g_bivariate <- function(label = "Bivariate Plots",
195195
ggplot2_args = teal.widgets::ggplot2_args(),
196196
pre_output = NULL,
197197
post_output = NULL,
198-
decorators = list(default = teal_transform_module())) {
198+
decorators = NULL) {
199199
message("Initializing tm_g_bivariate")
200200

201201
# Normalize the parameters
@@ -276,7 +276,7 @@ tm_g_bivariate <- function(label = "Bivariate Plots",
276276
checkmate::assert_multi_class(pre_output, c("shiny.tag", "shiny.tag.list", "html"), null.ok = TRUE)
277277
checkmate::assert_multi_class(post_output, c("shiny.tag", "shiny.tag.list", "html"), null.ok = TRUE)
278278

279-
checkmate::assert_list(decorators, "teal_transform_module")
279+
checkmate::assert_list(decorators, "teal_transform_module", null.ok = TRUE)
280280
# End of assertions
281281

282282
# Make UI args
@@ -300,8 +300,7 @@ tm_g_bivariate <- function(label = "Bivariate Plots",
300300
ui_args = args,
301301
server_args = c(
302302
data_extract_list,
303-
list(plot_height = plot_height, plot_width = plot_width, ggplot2_args = ggplot2_args),
304-
decorators = decorators
303+
list(plot_height = plot_height, plot_width = plot_width, ggplot2_args = ggplot2_args, decorators = decorators)
305304
),
306305
datanames = teal.transform::get_extract_datanames(data_extract_list)
307306
)
@@ -705,6 +704,7 @@ srv_g_bivariate <- function(id,
705704

706705

707706
plot_r <- reactive({
707+
req(output_q())
708708
decorated_output_q_facets()[["plot"]]
709709
})
710710

0 commit comments

Comments
 (0)