Skip to content

Commit

Permalink
also check whether ordered is null or not
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood committed Sep 19, 2023
1 parent 1f54ebe commit 4ea51e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/read_h5ad_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ read_h5ad_categorical <- function(file, name, version = "0.2.0") {

attributes <- rhdf5::h5readAttributes(file, name)
ordered <- attributes[["ordered"]]
if (is.na(ordered)) {
if (is.null(ordered) || is.na(ordered)) {
# This version of {rhdf5} doesn't yet support ENUM type attributes so we
# can't tell if the categorical should be ordered,
# see https://github.com/grimbough/rhdf5/issues/125
Expand Down

0 comments on commit 4ea51e4

Please sign in to comment.