You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
)
* prevent value from being returned by Context.prototype.lookup if lookupHit is false
* add test for renderability of Array.length via dot notation
* Remove `typeof obj === 'object'` constraint in prop lookup
Allows rendering properties of primitive types that are not objects, such as a string.
* pop lookup needs to use hasOwnProperty for non-objs
* re-add constraint in prop lookup, but make property lookups for primitives possible through dot notation
* add test to address #589 specifically
* enhance readability of primitiveHasOwnProperty and add comments to explain why it is used in one case but not the other
Mustache.render('{{#list}}{{a.length}}{{/list}}', {list: [{a: 'a'}]}) === ""
When:
Mustache.render('{{a.length}}', {a: 'a'}) === "1"
The text was updated successfully, but these errors were encountered: