diff options
author | kpdecker <kpdecker@gmail.com> | 2014-08-14 00:28:57 -0500 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2014-08-14 00:29:25 -0500 |
commit | 9f8110fe1505c6398aaebb1fff9a2ea2a8f99010 (patch) | |
tree | 92688c262694323f91c9045deea71d635ad71b90 /lib/handlebars/compiler/javascript-compiler.js | |
parent | 0edce6e1d1555cfbe0c55908261fc304a145f1a1 (diff) | |
download | handlebars.js-9f8110fe1505c6398aaebb1fff9a2ea2a8f99010.zip handlebars.js-9f8110fe1505c6398aaebb1fff9a2ea2a8f99010.tar.gz handlebars.js-9f8110fe1505c6398aaebb1fff9a2ea2a8f99010.tar.bz2 |
Implement partial recursive lookup
Diffstat (limited to 'lib/handlebars/compiler/javascript-compiler.js')
-rw-r--r-- | lib/handlebars/compiler/javascript-compiler.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/handlebars/compiler/javascript-compiler.js b/lib/handlebars/compiler/javascript-compiler.js index a8544d5..ef02cc7 100644 --- a/lib/handlebars/compiler/javascript-compiler.js +++ b/lib/handlebars/compiler/javascript-compiler.js @@ -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(", ") + ")"); }, |