Skip to content

Commit 20a813a

Browse files
committed
add default args
1 parent 728f4e8 commit 20a813a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

R/all-classes.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ class_theme <- S7::new_class(
218218
complete = S7::class_logical,
219219
validate = S7::class_logical
220220
),
221-
constructor = function(elements, ..., complete, validate) {
221+
constructor = function(elements = list(), ..., complete = FALSE, validate = TRUE) {
222222
warn_dots_empty()
223223
S7::new_object(
224224
elements,
@@ -247,7 +247,7 @@ class_theme <- S7::new_class(
247247
#' @export
248248
class_labels <- S7::new_class(
249249
"labels", parent = class_S3_gg,
250-
constructor = function(labels, ...) {
250+
constructor = function(labels = list(), ...) {
251251
warn_dots_empty()
252252
S7::new_object(labels)
253253
},
@@ -283,7 +283,7 @@ class_labels <- S7::new_class(
283283
#' @export
284284
class_mapping <- S7::new_class(
285285
"mapping", parent = class_S3_gg,
286-
constructor = function(x, ..., env = globalenv()) {
286+
constructor = function(x = list(), ..., env = globalenv()) {
287287
warn_dots_empty()
288288
check_object(x, is.list, "a {.cls list}")
289289
x <- lapply(x, new_aesthetic, env = env)

man/class_labels.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/class_mapping.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/class_theme.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)