Skip to content

Commit

Permalink
Merge pull request #1578 from ropensci/prepareWidget
Browse files Browse the repository at this point in the history
Fix preparation for shiny rendering
  • Loading branch information
cpsievert authored Oct 8, 2019
2 parents 972a4cb + a0fa68f commit 08d402c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/shiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ renderPlotly <- function(expr, env = parent.frame(), quoted = FALSE) {
# Converts a plot, OR a promise of a plot, to plotly
prepareWidget <- function(x) {
p <- if (promises::is.promising(x)) {
promises::then(x, plotly_build)
promises::then(x, ggplotly)
} else {
plotly_build(x)
ggplotly(x)
}
register_plot_events(p)
p
Expand Down

0 comments on commit 08d402c

Please sign in to comment.