From cf70a329ac996e3ab1e2354e24ef26a272cdabb9 Mon Sep 17 00:00:00 2001 From: yun Date: Tue, 23 Jul 2024 15:44:38 +0800 Subject: [PATCH] use .subset2 --- R/htanno-.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/htanno-.R b/R/htanno-.R index ccbce764..b86175d6 100644 --- a/R/htanno-.R +++ b/R/htanno-.R @@ -246,7 +246,9 @@ HtannoProto <- ggplot2::ggproto("HtannoProto", #' @export `$<-.HtannoProto` <- function(x, name, value) { if (.subset2(x, "isLock")) { - cli::cli_abort("{.fn {snake_class(x)}} is locked", call = x$call) + cli::cli_abort("{.fn {snake_class(x)}} is locked", + call = .subset2(x, "call") + ) } assign(x = name, value = value, envir = x) invisible(x)