fixed rendering with variables

This commit is contained in:
javi 2013-11-25 16:36:14 +01:00
parent fadcb3391d
commit d1c6c9fb82

View File

@ -11,7 +11,7 @@ tree.Value.prototype.toJS = function() {
v = "'" + v + "'";
} else if (val.is === 'field') {
// replace [varuable] by ctx['variable']
v = v.replace(/\[(.*)\]/g, "ctx['\$1']")
v = v.replace(/\[(.*)\]/g, "data['\$1']")
}
return "_value = " + v + ";";
};