Skip to content
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

Templates read {{if}} as helper without '#' #1447

Closed
s7726 opened this issue May 27, 2018 · 1 comment
Closed

Templates read {{if}} as helper without '#' #1447

s7726 opened this issue May 27, 2018 · 1 comment

Comments

@s7726
Copy link

s7726 commented May 27, 2018

https://jsfiddle.net/tb58kjmx/2/

My data contains the key 'if', When attempting to expand the template I'm getting:
Uncaught TypeError: Cannot read property 'hash' of undefined handlebars.js:817
It appears handlebars is attempting to treat my template {{if}} like a helper.
From the way I read the documentation, to invoke the 'if' helper it should have the {{#if condition}} syntax.

This is unexpected behavior. Is there a suggested work around? Obviously I could mangle my data ahead of time, is there a way to escape the name in the template to get past the helper check?

@nknapp
Copy link
Collaborator

nknapp commented May 28, 2018

If might work with {{[if]}} (#1251)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants