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.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js
index 3c4a9b7..b92289a 100644
--- a/lib/handlebars/compiler/compiler.js
+++ b/lib/handlebars/compiler/compiler.js
@@ -203,8 +203,14 @@ Compiler.prototype = {
var partialName = partial.partialName;
this.usePartial = true;
- if(partial.context) {
- this.ID(partial.context);
+ if (partial.hash) {
+ this.accept(partial.hash);
+ } else {
+ this.opcode('push', 'undefined');
+ }
+
+ if (partial.context) {
+ this.accept(partial.context);
} else {
this.opcode('push', 'depth0');
}