loicfrering/backbone.handlebars — pull request #4 by chromakode (2014-02-07 08:33:47+00:00)
Title: Fix helpers with recent Handlebars and improve server-side compatibility

I believe I've discovered a fix for https://github.com/loicfrering/backbone.handlebars/issues/2 while hacking around running this module server-side tonight. It looks like Handlebars is applying the `nameLookup` function to helper lookups now, generating code like this:

+ escapeExpression((helper = helpers.get ? helpers.get('view') : helpers.view || depth0.get ? depth0.get('view') : (depth0 && depth0.view),options={...

I'd guess that order of operations is causing this to have an unexpected result. Surrounding the `nameLookup` output with parentheses got things working again. :)