Skip to content

Commit 39bcc58

Browse files
authored
Use force=TRUE when viewing data.frame and list (#1255)
1 parent 0c475fe commit 39bcc58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/session/vsc.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,13 +466,13 @@ if (show_view) {
466466
x <- as_truncated_data(x)
467467
data <- dataview_table(x)
468468
file <- tempfile(tmpdir = tempdir, fileext = ".json")
469-
jsonlite::write_json(data, file, na = "string", null = "null", auto_unbox = TRUE)
469+
jsonlite::write_json(data, file, na = "string", null = "null", auto_unbox = TRUE, force = TRUE)
470470
request("dataview", source = "table", type = "json",
471471
title = title, file = file, viewer = viewer, uuid = uuid)
472472
} else if (is.list(x)) {
473473
tryCatch({
474474
file <- tempfile(tmpdir = tempdir, fileext = ".json")
475-
jsonlite::write_json(x, file, na = "string", null = "null", auto_unbox = TRUE)
475+
jsonlite::write_json(x, file, na = "string", null = "null", auto_unbox = TRUE, force = TRUE)
476476
request("dataview", source = "list", type = "json",
477477
title = title, file = file, viewer = viewer, uuid = uuid)
478478
}, error = function(e) {

0 commit comments

Comments
 (0)