Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kuethe committed Jan 11, 2024
1 parent c7d278e commit 1f443ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ set_maplibre_class <- function(.obj, class_name) {
}

rdantic <- function(.obj, types, test = 1L) {
for (i in 1:length(.obj)) {
type_check <- types[[i]]
value <- .obj[[i]]
for (k in names(.obj)) {
type_check <- types[[k]]
value <- .obj[[k]]
if (xor(!type_check(value), is.null(value))) {
stop(value, " is not ", deparse(substitute(type_check)) , call.=FALSE)
}
Expand Down

0 comments on commit 1f443ca

Please sign in to comment.