Skip to content

Commit e1254e7

Browse files
committed
for cases with just one call, do not DROP matrix calss in call_breaks
1 parent 6d674ac commit e1254e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/utils-get_code_dependency.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ get_call_breaks <- function(code) {
488488
#' @noRd
489489
split_code <- function(code) {
490490
call_breaks <- get_call_breaks(code)
491-
call_breaks <- call_breaks[order(call_breaks[, "line"], call_breaks[, "col"]), ]
491+
call_breaks <- call_breaks[order(call_breaks[, "line"], call_breaks[, "col"]), , drop = FALSE]
492492
code_split <- strsplit(code, split = "\n", fixed = TRUE)[[1]]
493493
char_count_lines <- c(0, cumsum(sapply(code_split, nchar, USE.NAMES = FALSE) + 1), -1)[seq_along(code_split)]
494494

0 commit comments

Comments
 (0)