@@ -235,10 +235,10 @@ get_assets <- function(p) {
235
235
deps <- list (NULL )
236
236
# if there are any geo trace(s), add the geo assets dependency
237
237
if (any(grepl(" geo|choropleth" , types ))) {
238
- deps [[ 1 ]] <- plotly_dist(" geo" )
238
+ deps <- c( deps , plotly_dist(" geo" ) )
239
239
}
240
240
if (isTRUE(p $ config $ mathjax )) {
241
- deps [[ 2 ]] <- plotly_dist(" mathjax" )
241
+ deps <- c( deps , plotly_dist(" mathjax" ) )
242
242
}
243
243
deps
244
244
}
@@ -260,12 +260,13 @@ plotly_dist <- function(extra = c("mathjax", "geo")) {
260
260
pat <- ' MathJax.fileversion="[0-9]+.[0-9]+.[0-9]+'
261
261
ver <- regmatches(mathjax , regexpr(pat , mathjax ))
262
262
ver <- sub(' "' , ' ' , strsplit(ver , " =" )[[1 ]][2 ])
263
- htmltools :: htmlDependency(
263
+ dep <- htmltools :: htmlDependency(
264
264
name = " mathjax" ,
265
265
version = ver ,
266
266
src = dirname(mj ),
267
267
script = basename(mj )
268
268
)
269
+ return (list (dep ))
269
270
}
270
271
}
271
272
if (extra [1 ] == " geo" ) {
@@ -279,12 +280,13 @@ plotly_dist <- function(extra = c("mathjax", "geo")) {
279
280
} else {
280
281
geo <- file.path(path , " dist" , " plotly-geo-assets.js" )
281
282
if (! file.exists(geo )) stop(" Couldn't locate plotly-geo-assets.js" )
282
- htmltools :: htmlDependency(
283
+ dep <- htmltools :: htmlDependency(
283
284
name = " plotly-geo-assets" ,
284
285
src = dirname(geo ),
285
286
version = " 1.0" ,
286
287
script = basename(geo )
287
288
)
289
+ return (list (dep ))
288
290
}
289
291
}
290
292
}
0 commit comments