wycats/handlebars.js — pull request #182 by kpdecker (2014-01-17 22:50:02+00:00)
Title: Context different for partial

Hi folks,

When I have a template, say:

{{#each updates}}

{{#if ../user}}

{{user.name}}

{{/if}}

{{text}}

{{/each}}

And it works fine, but I move the update into a partial:

**file: update.handlebars**

{{#if ../user}}

{{user.name}}

{{/if}}

{{text}}

And include the partial where the update code used to be:

{{#each updates}}
{{> update}}
{{/each}}

I get "TypeError: Cannot read property 'user' of undefined" now. Why would the context be different for a partial containing the exact same code?