diff options
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 10 |
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'); } |