Skip to content

Commit 59cdc31

Browse files
authored
invokeRemote() should resolve dependencies before calling shiny::createWebDependency (#621)
* invokeRemote() should resolve dependencies before calling shiny::createWebDependency, fixes #620 * update news
1 parent 44df7d1 commit 59cdc31

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ leaflet 2.0.3
33

44
BUG FIXES and IMPROVEMENTS
55
* Fixed [rstudio/crosstalk#58](https://github.com/rstudio/crosstalk/issues/58), which caused Leaflet maps that used Crosstalk shared data in Shiny apps, to be redrawn at incorrect times.
6+
* invokeRemote() now resolves html dependencies before passing them to shiny::createWebDependency() (#620).
67
* Upgrade leaflet-provider to 1.4.0, enable more map variants such as CartoDB.Voyager (#567)
78
* `sf` objects with `names` attributes in the `st_geometry` now visualise correctly (#595)
89

R/utils.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,13 @@ invokeRemote <- function(map, method, args = list()) {
194194
if (!inherits(map, "leaflet_proxy"))
195195
stop("Invalid map parameter; map proxy object was expected")
196196

197+
deps <- htmltools::resolveDependencies(map$dependencies)
198+
197199
msg <- list(
198200
id = map$id,
199201
calls = list(
200202
list(
201-
dependencies = lapply(map$dependencies, shiny::createWebDependency),
203+
dependencies = lapply(deps, shiny::createWebDependency),
202204
method = method,
203205
args = args
204206
)

0 commit comments

Comments
 (0)