From 963ea6a43d21c2224b2d5a6747e409abf48e4443 Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Tue, 9 Jan 2024 16:46:31 -0800 Subject: [PATCH] Actually check that `.envir` is an environment The return of the fix for #308 --- R/glue.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/glue.R b/R/glue.R index 0a7693c..2b97ffc 100644 --- a/R/glue.R +++ b/R/glue.R @@ -97,6 +97,7 @@ glue_data <- function(.x, ..., .sep = "", .envir = parent.frame(), # Perform all evaluations in a temporary environment if (is.null(.x)) { + stopifnot(is.environment(.envir)) parent_env <- .envir } else if (is.environment(.x)) { parent_env <- .x