From 09f7bfdf538e30c4c0baa4e8bcf2c9558d8f5b8a Mon Sep 17 00:00:00 2001 From: Sebastian Funk Date: Wed, 20 Jul 2022 13:38:35 +0100 Subject: [PATCH] fix rt = NULL case --- R/estimate_infections.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/estimate_infections.R b/R/estimate_infections.R index 3104a8e59..60212df25 100644 --- a/R/estimate_infections.R +++ b/R/estimate_infections.R @@ -205,7 +205,7 @@ estimate_infections <- function(reported_cases, # store dirty reported case data dirty_reported_cases <- data.table::copy(reported_cases) - if (!rt$use_rt) { + if (!is.null(rt) && !rt$use_rt) { rt <- NULL }