Skip to content

Commit c8ca00d

Browse files
committed
improve req_data prep #29
1 parent 704ef06 commit c8ca00d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/lib.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ prep_req_data <- function(tbl) {
185185
if (purrr::pluck_exists(tbl, "options")) {
186186
tbl$options <- purrr::map(tbl$option, jsonlite::unbox)
187187
}
188-
purrr::map(tbl, function(x) {
189-
if (!is.list(x)) {
188+
purrr::modify_tree(tbl, leaf = function(x) {
189+
if (length(x) == 1L) {
190190
jsonlite::unbox(x)
191191
} else {
192192
x

0 commit comments

Comments
 (0)