diff --git a/R/ui.R b/R/ui.R index 9cc723fa5..d0f20defe 100644 --- a/R/ui.R +++ b/R/ui.R @@ -445,7 +445,8 @@ rxUiDecompress <- function(ui) { rxUiCompress <- function(ui) { if (!inherits(ui, "rxUi")) return(ui) if (is.environment(ui)) { - .ret <- qs::qserialize(ui, preset="fast") + .ret <- try(qs::qserialize(ui, preset="fast"), silent=TRUE) + if (inherits(.ret, "try-error")) .ret <- qs::qserialize(ui, preset="archive") class(.ret) <- c("rxUi", "raw") return(.ret) }