-
Notifications
You must be signed in to change notification settings - Fork 422
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
mustache: 'with' string is interpreted as with helper keyword #538
Comments
EDIT: Upon further investigation and testing with Handlebars, this is about par for the course. For example if you go to http://tryhandlebarsjs.com/ and try the following data: { "each" : "bar" } with the following template: <h1>{{each}}</h1> it'll balk at you with the same type of error: // TypeError: Cannot read property 'fn' of undefined The real question is: For this type of situation do we maintain the status quo, or do we do something? If we do something, what is it that we do? |
I don't think this is the same issue. In our case |
Well "each" is a keyword should probably not be used as data attribute name. In my case I don't use keyword as data attribute name. {{text}} is not a helper. Error appears only if {text: 'with'}. Strange bug. |
True, but in our case |
A string value in your view data should never be interpreted as a keyword for anything. |
Fixes #538 helpers aren't called is data passed to the template happens ...
cases an error in mustache.js
Look at the console:
http://jsfiddle.net/xKc3H/253/
The text was updated successfully, but these errors were encountered: