Skip to content

Commit fa861fe

Browse files
committed
fix a couple of typos in the convenience properties
1 parent 600eb07 commit fa861fe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/property.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ new_list_property <- function(..., validator = NULL, of = class_any, named = NA)
544544
if (identical(named, FALSE) && !is.null(names(value)))
545545
"must not have names",
546546
if (!is.null(validator))
547-
valdiator(value)
547+
validator(value)
548548
)
549549
})
550550
prop$of <- of

R/utils.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ check_name <- function(name, arg = deparse(substitute(name))) {
9494
check_scalar <- function(scalar, class, arg = deparse(substitute(scalar)))
9595
{
9696
if (length(scalar) != 1 || !class_inherits(scalar, class)) {
97-
type_name <- if (identical(class, class_numeric)) "numeric" else class$name
97+
type_name <- if (identical(class, class_numeric)) "numeric" else class$class
9898
msg <- sprintf("`%s` must be a single %s value", arg, type_name)
9999
stop(msg, call. = FALSE)
100100
}

0 commit comments

Comments
 (0)