Skip to content

Commit

Permalink
Update R/zzz.R
Browse files Browse the repository at this point in the history
Co-authored-by: Hadley Wickham <[email protected]>
  • Loading branch information
t-kalinowski and hadley authored Oct 24, 2024
1 parent 59fd3e0 commit 86656a8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ is_S7_type <- function(x) {
}

check_subsettable <- function(x, allow_env = FALSE) {
allowed_types <- c("list", if (allow_env) "environment",
"language", "pairlist")
allowed_types <- c("list", "language", "pairlist", if (allow_env) "environment")
if (!typeof(x) %in% allowed_types) {
stop("S7 objects are not subsettable.", call. = TRUE)
}
Expand Down

0 comments on commit 86656a8

Please sign in to comment.