Skip to content

Commit 02b3617

Browse files
committed
Simplify
1 parent 81ba8de commit 02b3617

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/subsetting.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,10 @@ NULL
228228
}
229229

230230
# From here on, i, j and drop contain correct values:
231-
xo <- x
232-
233-
if (!is.null(j)) {
234-
j <- vectbl_as_col_location(j, length(xo), names(xo), j_arg = j_arg, assign = FALSE)
231+
if (is.null(j)) {
232+
xo <- x
233+
} else {
234+
j <- vectbl_as_col_location(j, length(x), names(x), j_arg = j_arg, assign = FALSE)
235235

236236
if (anyNA(j)) {
237237
cnd_signal(error_na_column_index(which(is.na(j))))

0 commit comments

Comments
 (0)