We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If you do a check like so: {{#if foobar}}{{foobar}}{{/if}} It only works in you pass something to the template function.
{{#if foobar}}{{foobar}}{{/if}}
I've created a JSFiddle that shows this behaviour: http://jsfiddle.net/aLpqs/
I think that the context should default to {} if nothing was given. I don't see how that would break any existing code either.
The text was updated successfully, but these errors were encountered:
I guess similarly, a template like {{foo.bar}} fails if the foo variable isn't defined.
{{foo.bar}}
foo
Sorry, something went wrong.
Yeah, though this is not as big an issue I think because you can just check if foo is defined first.
7f6ef1d
Protect context-lookups from undefined values
ded0a16
Fixes #166 Fixes #587
No branches or pull requests
If you do a check like so:
{{#if foobar}}{{foobar}}{{/if}}
It only works in you pass something to the template function.
I've created a JSFiddle that shows this behaviour: http://jsfiddle.net/aLpqs/
I think that the context should default to {} if nothing was given.
I don't see how that would break any existing code either.
The text was updated successfully, but these errors were encountered: