Add global not working with Proxy #550
Unanswered
noel-schenk
asked this question in
Q&A
Replies: 2 comments
-
Can you paste the Twig template that fails? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hey Eric sorry I this is not important rn. Can you add a label to keep this update so we can look into it at another time? The template could look like this:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dynamically generated functions do not work with add global.
twingEnv.addGlobal('dom', new DomGen().getInstance((subNameCallArray)=>{ return '{!'+subNameCallArray.join('.')+'!}'; }));
Standalone the function works perfectly:
https://jsfiddle.net/noelelias/4evgpko5/117/
Beta Was this translation helpful? Give feedback.
All reactions