summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/helpers/each.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/helpers/each.js')
-rw-r--r--lib/handlebars/helpers/each.js15
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/handlebars/helpers/each.js b/lib/handlebars/helpers/each.js
index fb11903..914928d 100644
--- a/lib/handlebars/helpers/each.js
+++ b/lib/handlebars/helpers/each.js
@@ -1,4 +1,4 @@
-import {appendContextPath, blockParams, createFrame, isArray, isFunction} from '../utils';
+import {createFrame, isArray, isFunction} from '../utils';
import Exception from '../exception';
export default function(instance) {
@@ -11,12 +11,7 @@ export default function(instance) {
inverse = options.inverse,
i = 0,
ret = '',
- data,
- contextPath;
-
- if (options.data && options.ids) {
- contextPath = appendContextPath(options.data.contextPath, options.ids[0]) + '.';
- }
+ data;
if (isFunction(context)) { context = context.call(this); }
@@ -30,15 +25,11 @@ export default function(instance) {
data.index = index;
data.first = index === 0;
data.last = !!last;
-
- if (contextPath) {
- data.contextPath = contextPath + field;
- }
}
ret = ret + fn(context[field], {
data: data,
- blockParams: blockParams([context[field], field], [contextPath + field, null])
+ blockParams: [context[field], field]
});
}