Skip to content

Commit 7d3138b

Browse files
committed
fix
1 parent 13b7f32 commit 7d3138b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/utils-get_code_dependency.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ get_call_breaks <- function(code) {
473473
matrix(c(max(x$line2), max(x$col2)))
474474
}
475475
))
476-
if (nrow(call_breaks) > 1) call_breaks <- call_breaks[-nrow(call_breaks), ] # breaks in between needed only
476+
call_breaks <- call_breaks[-nrow(call_breaks), ] # breaks in between needed only
477477
colnames(call_breaks) <- c("line", "col")
478478
call_breaks
479479
}
@@ -488,7 +488,7 @@ get_call_breaks <- function(code) {
488488
#' @noRd
489489
split_code <- function(code) {
490490
call_breaks <- get_call_breaks(code)
491-
if (nrow(call_breaks) == 1) {
491+
if (nrow(call_breaks) == 0) {
492492
return(code)
493493
}
494494
call_breaks <- call_breaks[order(call_breaks[, "line"], call_breaks[, "col"]), ]

0 commit comments

Comments
 (0)