Skip to content

Commit

Permalink
Fix if-else statement in vacamole args check
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikunterwegs committed Nov 21, 2023
1 parent f93ca7e commit 8f0b9c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/check_args_vacamole.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,16 @@
}

# handle time dependence if present and check for allowed primary parameters
if (!"time_dependence" %in% names(mod_args)) {
mod_args[["time_dependence"]] <- no_time_dependence()
} else {
if ("time_dependence" %in% names(mod_args)) {
checkmate::assert_names(
names(mod_args[["time_dependence"]]),
subset.of = c(
"transmissibility", "infectiousness_rate", "hospitalisation_rate",
"mortality_rate", "recovery_rate"
)
)
} else {
mod_args[["time_dependence"]] <- no_time_dependence()
}

# return arguments invisibly
Expand Down

0 comments on commit 8f0b9c4

Please sign in to comment.