walmartlabs/thorax — pull request #98 by eastridge (2013-01-11 23:46:22+00:00)
Title: Allow undefined return value of context function, make context function additive

This PR clarifies several behaviors used by Phoenix which were ambiguous in previous Thorax UTs.

1) `context` can return undefined.
2) `context` is additive, meaning it will add to the available context instead of replacing it.

To render a template with a particular context you would do:

this.renderTemplate(someTemplate, myContext)

This is for instance how renderItem / itemContext works.

@Candid @kpdecker this is the most backwards compatible behavior, let's just be sure it's what we really want!