diff --git a/lib/handlebars/base.js b/lib/handlebars/base.js index 56eb016a1..0bee1386c 100644 --- a/lib/handlebars/base.js +++ b/lib/handlebars/base.js @@ -101,7 +101,11 @@ function registerDefaultHelpers(instance) { } else { for(var key in context) { if(context.hasOwnProperty(key)) { - if(data) { data.key = key; } + if(data) { + data.key = key; + data.index = i; + data.first = (i == 0); + } ret = ret + fn(context[key], {data: data}); i++; }