diff --git a/NEWS.md b/NEWS.md index 92a4d22..f545702 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # htmlwidgets (development version) +* 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) + # htmlwidgets 1.6.3 ### Potentially breaking changes diff --git a/R/utils.R b/R/utils.R index a43a5ad..ef582ea 100644 --- a/R/utils.R +++ b/R/utils.R @@ -161,7 +161,8 @@ JSEvals <- function(list) { #' @noRd #' @keywords internal shouldEval <- function(options) { - if (inherits(options, c("list", "data.frame"))) { + if (is.list(options)) { + if (inherits(options, "POSIXlt")) return(FALSE) if ((n <- length(options)) == 0) return(FALSE) # use numeric indices as names (remember JS indexes from 0, hence -1 here) if (is.null(names(options)))