summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/compiler.js
diff options
context:
space:
mode:
authorKevin Decker <kpdecker@gmail.com>2014-02-09 19:16:47 -0600
committerKevin Decker <kpdecker@gmail.com>2014-02-09 19:16:47 -0600
commitdb651e7ff42bc2db2ae04ea1f1a5631628c3e3b9 (patch)
tree0cffa9a14a7f33b04f2f3431aa829722a3b1a99d /lib/handlebars/compiler/compiler.js
parentfcec69ae2c838a9df7a456557b57671a80d1732b (diff)
parent16f135835eb55dcbb7fa26dab63a9c20fd3981ac (diff)
downloadhandlebars.js-db651e7ff42bc2db2ae04ea1f1a5631628c3e3b9.zip
handlebars.js-db651e7ff42bc2db2ae04ea1f1a5631628c3e3b9.tar.gz
handlebars.js-db651e7ff42bc2db2ae04ea1f1a5631628c3e3b9.tar.bz2
Merge pull request #491 from wycats/data-depth
For nested helpers: get the @ variables of the outer helper from the inner one
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r--lib/handlebars/compiler/compiler.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js
index 21e1024..be17ac3 100644
--- a/lib/handlebars/compiler/compiler.js
+++ b/lib/handlebars/compiler/compiler.js
@@ -310,11 +310,7 @@ Compiler.prototype = {
DATA: function(data) {
this.options.data = true;
- if (data.id.isScoped || data.id.depth) {
- throw new Exception('Scoped data references are not supported: ' + data.original, data);
- }
-
- this.opcode('lookupData');
+ this.opcode('lookupData', data.id.depth);
var parts = data.id.parts;
for(var i=0, l=parts.length; i<l; i++) {
this.opcode('lookup', parts[i]);