From 8ad015f0cef12c77517d55f163d076bfc702f834 Mon Sep 17 00:00:00 2001 From: Yunuuuu Date: Thu, 5 Dec 2024 22:38:22 +0800 Subject: [PATCH] use waiver() for NULL data, which comply with ggplot2 --- R/plot-free-gg.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/plot-free-gg.R b/R/plot-free-gg.R index 16c19c42..1fedf95c 100644 --- a/R/plot-free-gg.R +++ b/R/plot-free-gg.R @@ -53,7 +53,7 @@ free_gg.ggplot <- function(..., data = waiver(), size = NULL, active = NULL) { plot <- data # In ggplot2, `waiver()` was regard to no data data <- .subset2(plot, "data") %|w|% NULL - plot["data"] <- list(NULL) + plot["data"] <- list(waiver()) new_free_gg(plot, data, size = size, active = active) }