Implement partial recursive lookup

This commit is contained in:
kpdecker
2014-08-14 00:28:57 -05:00
parent 0edce6e1d1
commit 9f8110fe15
3 changed files with 16 additions and 7 deletions
@@ -369,7 +369,7 @@ JavaScriptCompiler.prototype = {
var i = 0,
len = parts.length;
if (!scoped && this.isChild && this.options.compat && !this.lastContext) {
if (!scoped && this.options.compat && !this.lastContext) {
// The depthed query is expected to handle the undefined logic for the root level that
// is implemented below, so we evaluate that directly in compat mode
this.pushStackLiteral(this.depthedLookup(parts[i++]));
@@ -619,6 +619,9 @@ JavaScriptCompiler.prototype = {
if (this.options.data) {
params.push("data");
}
if (this.options.compat) {
params.push('depths');
}
this.push("this.invokePartial(" + params.join(", ") + ")");
},