diff --git a/NEWS.md b/NEWS.md index a93ec1b4d..1bfb11b66 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ ## Model changes - A bug was fixed where the initial growth was never estimated (i.e. the prior mean was always zero). By @sbfnk in #853 and reviewed by @seabbs. +- A bug was fixed where an internal function for applying a default cdf cutoff failed due to a difference a vector length issue. By @jamesmbaazam in #858 and reviewed by @sbfnk. # EpiNow2 1.6.1 diff --git a/R/opts.R b/R/opts.R index c2c23429d..6b5a46b12 100644 --- a/R/opts.R +++ b/R/opts.R @@ -1091,7 +1091,7 @@ filter_opts <- function(opts, region) { #' constrained #' @keywords internal apply_default_cdf_cutoff <- function(dist, default_cdf_cutoff, cdf_cutoff_set) { - if (!is_constrained(dist) && !is.na(sd(dist))) { + if (!is_constrained(dist) && !anyNA(sd(dist))) { #nolint start: duplicate_argument_linter cli_inform( c(