Skip to content

Commit b7b5d9b

Browse files
committed
pass along a quoted expr that calls func()
1 parent 8a3c444 commit b7b5d9b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

R/shiny.R

+3-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,9 @@ renderPlotly <- function(expr, env = parent.frame(), quoted = FALSE) {
4848
# prepareWidget() makes it possible to pass different non-plotly
4949
# objects to renderPlotly() (e.g., ggplot2, promises). It also is used
5050
# to inform event_data about what events have been registered
51-
shiny::installExprFunction(expr, "func", env, quoted)
52-
renderFunc <- shinyRenderWidget(
53-
plotly:::prepareWidget(func()), plotlyOutput, env, quoted
54-
)
51+
shiny::installExprFunction(expr, "func", env, quoted, assign.env = env)
52+
expr <- quote(plotly:::prepareWidget(func()))
53+
renderFunc <- shinyRenderWidget(expr, plotlyOutput, env, quoted)
5554
# remove 'internal' plotly attributes that are known to cause false
5655
# positive test results in shinytest (snapshotPreprocessOutput was added
5756
# in shiny 1.0.3.9002, but we require >= 1.1)

0 commit comments

Comments
 (0)