diff options
author | kpdecker <kpdecker@gmail.com> | 2012-08-21 12:49:40 -0500 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2012-08-21 12:49:40 -0500 |
commit | dc0426d836027b611b61ebdf0a491e9e6ab889db (patch) | |
tree | 8ef9806dbd558719dad3f90a344230bb416a70a2 /lib/handlebars/compiler/compiler.js | |
parent | fc99d90337b6a9e21a498d8b4f52fdc9ad7b156c (diff) | |
parent | 6761d4c6d16893f1a347d69956f926f56124e841 (diff) | |
download | handlebars.js-dc0426d836027b611b61ebdf0a491e9e6ab889db.zip handlebars.js-dc0426d836027b611b61ebdf0a491e9e6ab889db.tar.gz handlebars.js-dc0426d836027b611b61ebdf0a491e9e6ab889db.tar.bz2 |
Merge with upstream/master
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index ca59725..108d055 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -240,7 +240,13 @@ Handlebars.JavaScriptCompiler = function() {}; ID: function(id) { this.addDepth(id.depth); this.opcode('getContext', id.depth); - this.opcode('lookupOnContext', id.parts[0]); + + var name = id.parts[0]; + if (!name) { + this.opcode('pushContext'); + } else { + this.opcode('lookupOnContext', id.parts[0]); + } for(var i=1, l=id.parts.length; i<l; i++) { this.opcode('lookup', id.parts[i]); |