diff options
author | kpdecker <kpdecker@gmail.com> | 2014-01-17 16:49:44 -0600 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2014-01-17 17:51:52 -0600 |
commit | 45ae86a248f3da7f24ee68da12454a2444ec398f (patch) | |
tree | 0c2a4b4cab6ed591eeb2a68b44c4e82ff07c8748 /lib/handlebars/compiler/compiler.js | |
parent | f90981adf608f98551d527c3109771d8babbba9f (diff) | |
download | handlebars.js-45ae86a248f3da7f24ee68da12454a2444ec398f.zip handlebars.js-45ae86a248f3da7f24ee68da12454a2444ec398f.tar.gz handlebars.js-45ae86a248f3da7f24ee68da12454a2444ec398f.tar.bz2 |
Implement partial hash evaluation
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'); } |