Skip to content

Commit fdc4fd3

Browse files
committed
improve check on r6 cloneable
1 parent f95875b commit fdc4fd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/checkR6.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ checkR6Props = function(x, cloneable = NULL, public = NULL, private = NULL) {
3939
if (!is.null(cloneable)) {
4040
qassert(cloneable, "B1")
4141
if (cloneable) {
42-
if (is.null(x$clone))
42+
if (!exists("clone", envir = x))
4343
return("Must be cloneable")
4444
} else {
45-
if (!is.null(x$clone))
45+
if (exists("clone", envir = x))
4646
return("May not be cloneable")
4747
}
4848
}

0 commit comments

Comments
 (0)