Skip to content

Commit

Permalink
allow delayed data to pass in cs_to_des_select
Browse files Browse the repository at this point in the history
  • Loading branch information
chlebowa committed Dec 18, 2024
1 parent 85884b2 commit 341bc91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ cs_to_des_select <- function(cs, dataname, multiple = FALSE, ordered = FALSE, la
checkmate::check_class(cs, classes = "choices_selected"),
.var.name = cs_name
)
if (!multiple && length(cs$selected) != 1 && !is.null(cs$selected)) {
stop(cs_name, "must only have 1 selected value")
if (!inherits(cs$selected, "delayed_data") && !multiple && length(cs$selected) != 1 && !is.null(cs$selected)) {
stop(cs_name, " must only have 1 selected value")
}

if (inherits(cs, "choices_selected")) {
Expand Down

0 comments on commit 341bc91

Please sign in to comment.