Allow implicit context iteration with each

Fixes #671
This commit is contained in:
kpdecker
2014-01-17 20:13:00 -06:00
parent 363cb4b0fb
commit fe4880feaa
2 changed files with 11 additions and 0 deletions
+6
View File
@@ -80,6 +80,12 @@ function registerDefaultHelpers(instance) {
});
instance.registerHelper('each', function(context, options) {
// Allow for {{#each}}
if (!options) {
options = context;
context = this;
}
var fn = options.fn, inverse = options.inverse;
var i = 0, ret = "", data;