bugfix: jsonlite::fromJSON() chokes on a blank

This commit is contained in:
hyginn 2020-10-13 20:35:45 +10:00
parent 804e3a73b7
commit a50688e0d0

View File

@ -614,7 +614,7 @@ dbSeq2JSON <- function(s, nIndents = 4, width = 70) {
ind <- paste0(rep(" ", nIndents), collapse = "") ind <- paste0(rep(" ", nIndents), collapse = "")
out <- character() out <- character()
out <- c(out, sprintf("%s\"sequence\" : [", ind)) out <- c(out, sprintf("%s\"sequence\": [", ind))
for (i in seq_along(s)) { for (i in seq_along(s)) {
l <- nchar(s[i]) l <- nchar(s[i])