Skip to content

Commit e87f8d9

Browse files
committed
chore: decorators default argument is empty list and adds original error
1 parent 4263afe commit e87f8d9

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

R/tm_g_response.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ tm_g_response <- function(label = "Response Plot",
156156
ggplot2_args = teal.widgets::ggplot2_args(),
157157
pre_output = NULL,
158158
post_output = NULL,
159-
decorators = list(default = teal_transform_module())) {
159+
decorators = list()) {
160160
message("Initializing tm_g_response")
161161

162162
# Normalize the parameters
@@ -555,7 +555,10 @@ srv_g_response <- function(id,
555555
decorated_output_q <- srv_teal_transform_data(id = "decorator", data = output_q, transformators = decorators)
556556

557557
decorated_output_plot_q <- reactive(within(decorated_output_q(), print(plot)))
558-
plot_r <- reactive(decorated_output_plot_q()[["plot"]])
558+
plot_r <- reactive({
559+
req(output_q()) # Ensure original errors are displaye
560+
decorated_output_plot_q()[["plot"]]
561+
})
559562

560563
# Insert the plot into a plot_with_settings module from teal.widgets
561564
pws <- teal.widgets::plot_with_settings_srv(

man/tm_g_response.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/tm_outliers.Rd

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)