Skip to content

Commit 3133522

Browse files
committed
get rid of warnings
1 parent 46bbe5f commit 3133522

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

R/mod_edish.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ edish_server <- function(
283283
mod_return_value <- NULL
284284
if (!is.null(on_sbj_click)) {
285285
shiny::observe({
286+
# Below req is needed to avoid warning when plot object is not there
287+
shiny::req(output$plot() != "{\"x\":null,\"evals\":[],\"jsHooks\":null,\"deps\":[]}")
286288
shiny::req(!is.null(plotly::event_data(
287289
event = "plotly_click",
288290
source = session[["ns"]]("plot"),
@@ -292,6 +294,8 @@ edish_server <- function(
292294
})
293295
mod_return_value <- list(
294296
subj_id = shiny::reactive({
297+
# Below req is needed to avoid warning when plot object is not there
298+
shiny::req(output$plot() != "{\"x\":null,\"evals\":[],\"jsHooks\":null,\"deps\":[]}")
295299
plotly::event_data(
296300
event = "plotly_click",
297301
source = session[["ns"]]("plot"),

0 commit comments

Comments
 (0)