Skip to content

Commit

Permalink
Update attr.R
Browse files Browse the repository at this point in the history
  • Loading branch information
ilovemane committed Aug 15, 2024
1 parent 8a55490 commit cde98bc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions R/attr.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,18 @@ is_dictionaryish <- function(x) {
# 2022-01: Used in many packages. Don't deprecate without a
# replacement.
if (is.null(x)) {
TRUE
} else {
if (!length(x)) {
return(!is.null(x))
}

is_named(x) && !any(duplicated(names(x)))
return(TRUE)
}

if (!length(x)) {
return(!is.null(x))
}

is_named(x) && !any(duplicated(names(x)))
}



#' Does an object have an element with this name?
#'
#' This function returns a logical value that indicates if a data
Expand Down

0 comments on commit cde98bc

Please sign in to comment.