Skip to content

Commit

Permalink
chore: Check fast path first
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Dec 19, 2023
1 parent 3c4744a commit 6f5c3af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/as_tibble.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ as_tibble.data.frame <- function(x, validate = NULL, ...,
deprecate_stop("2.0.0", "tibble::as_tibble(validate = )", "as_tibble(.name_repair =)")
}

if (!inherits(x, "tbl_df") && !identical(class(x), "data.frame")) {
if (!identical(class(x), "data.frame") && !inherits(x, "tbl_df")) {
x <- as.data.frame(x)
}

Expand Down

0 comments on commit 6f5c3af

Please sign in to comment.