From 5a13358ef8c27c96e88f08c9d52873faf8287511 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Mon, 11 Sep 2023 02:23:12 +0200 Subject: [PATCH] Defer all code generation for with expressions, to avoid Babel validation errors for dynamically generated environment values --- src/transformers/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/index.js b/src/transformers/index.js index 06992d1..f5b967a 100644 --- a/src/transformers/index.js +++ b/src/transformers/index.js @@ -93,11 +93,11 @@ let trivial = { let contextName = `$implicit${implicitContextCounter++}`; setContext(null, "implicitContext", contextName); + return defer((node) => { let setupCode = (hasParent) ? tmplImplicitContextNested({ environment: node.environment, parent: parentContext }) : tmplImplicitContextTop({ environment: node.environment }); - return defer((node) => { return tmplWithWrapper({ contextName: contextName, setupCode: setupCode,