-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown Template Variables #1477
Comments
If your variables are flat (no nesting), then this workaround works:
When your template is compiled with that context, it'll call Note that it only works with top-level variables though, so if you had {{user.name}} and {{weather.mood}} that wouldn't work unfortunately. |
@dominicporteous @mcintyre94 Just ran into this issue as well. I've got a workaround (HACK) to handle arbitrary nesting via ES6 Proxy objects for the interim:
|
Closing due to inactivity, but this may be related to #1435 |
It is really good solution, thanks for providing this solution. |
Is there a way to preserve the templated variable if a variable is undefined in the compile context?
e.g.
Compiled with the following context;
Would result in the following output;
I've had a look through the api, and even some of the code, but I cant seem to find what I'm looking for.
The mustache docs state the following;
http://mustache.github.io/mustache.5.html
I cant seem to find the place to configure this in Handlebars. Any help would be much appreciated!
The text was updated successfully, but these errors were encountered: