summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/compiler.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r--lib/handlebars/compiler/compiler.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js
index 64af5da..987d0d4 100644
--- a/lib/handlebars/compiler/compiler.js
+++ b/lib/handlebars/compiler/compiler.js
@@ -177,7 +177,11 @@ Compiler.prototype = {
if (params.length > 1) {
throw new Exception('Unsupported number of partial arguments: ' + params.length, partial);
} else if (!params.length) {
- params.push({type: 'PathExpression', parts: [], depth: 0});
+ if (this.options.explicitPartialContext) {
+ this.opcode('pushLiteral', 'undefined');
+ } else {
+ params.push({type: 'PathExpression', parts: [], depth: 0});
+ }
}
let partialName = partial.name.original,