We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0abee45 commit a5203d3Copy full SHA for a5203d3
R/arguments.R
@@ -76,10 +76,9 @@ set_args <- function(object, ...) {
76
#' @rdname set_args
77
#' @export
78
set_mode <- function(object, mode) {
79
- if (is.null(mode))
80
- return(object)
+ if (rlang::is_missing(mode)) mode <- NULL
81
mode <- mode[1]
82
- if (!(any(all_modes == mode))) {
+ if (is.null(mode) | !(any(all_modes == mode))) {
83
rlang::abort(
84
glue::glue(
85
"`mode` should be one of ",
0 commit comments