Skip to content

Commit

Permalink
do not compare class to string anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
cszang committed Sep 18, 2024
1 parent cde3f15 commit b02c171
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/as_tcclimate.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ as_tcclimate <- function(x, varnames = NULL) {
}
}

if (is.null(varnames) & !is.null(names(x)) & (class(x) == "list")) {
if (is.null(varnames) & !is.null(names(x)) & inherits(x, "list")) {
colnames(output)[-c(1,2)] <- names(x)
}

Expand Down

0 comments on commit b02c171

Please sign in to comment.