Skip to content

Commit dec6c30

Browse files
authored
fix: Restores eager recursion into options objects (#478)
1 parent b0f3d56 commit dec6c30

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# htmlwidgets (development version)
22

3+
* htmlwidgets once again eagerly recurses into list-like objects when searching for JavaScript strings wrapped in `JS()`. If you encounter an infinite recursion ("C stack usage is too close to the limit"), the best strategy is to coerce the offending items to a character string. (#478)
4+
35
# htmlwidgets 1.6.3
46

57
### Potentially breaking changes

R/utils.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ JSEvals <- function(list) {
161161
#' @noRd
162162
#' @keywords internal
163163
shouldEval <- function(options) {
164-
if (inherits(options, c("list", "data.frame"))) {
164+
if (is.list(options)) {
165+
if (inherits(options, "POSIXlt")) return(FALSE)
165166
if ((n <- length(options)) == 0) return(FALSE)
166167
# use numeric indices as names (remember JS indexes from 0, hence -1 here)
167168
if (is.null(names(options)))

0 commit comments

Comments
 (0)