From 2ad3d5ec99c8da271731801fb547730510b2a346 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 11 Jul 2024 11:31:05 +0200 Subject: [PATCH] be safe --- R/plot.check_heteroscedasticity.R | 2 +- R/plots.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/plot.check_heteroscedasticity.R b/R/plot.check_heteroscedasticity.R index e982cac3e..a81323c71 100644 --- a/R/plot.check_heteroscedasticity.R +++ b/R/plot.check_heteroscedasticity.R @@ -48,7 +48,7 @@ plot.see_check_heteroscedasticity <- function(x, }, error = function(e) { # debugging - if (getOption("easystats_errors", FALSE)) { + if (isTRUE(getOption("easystats_errors", FALSE))) { insight::format_error(e$message) } NULL diff --git a/R/plots.R b/R/plots.R index 5f60a874a..996427084 100644 --- a/R/plots.R +++ b/R/plots.R @@ -100,7 +100,7 @@ plots <- function(..., .safe_print_plots <- function(pw, ...) { pw_drawn <- tryCatch(print(pw), error = function(e) e) # for debugging, return original error - if (getOption("easystats_errors", FALSE)) { + if (isTRUE(getOption("easystats_errors", FALSE))) { insight::format_error(pw_drawn$message) } if (inherits(pw_drawn, "simpleError")) {