Avoid depth construction overhead for non-depthed
This commit is contained in:
@@ -151,7 +151,7 @@ export function program(container, i, fn, data, depths) {
|
||||
var prog = function(context, options) {
|
||||
options = options || {};
|
||||
|
||||
return fn.call(container, context, container.helpers, container.partials, options.data || data, [context].concat(depths));
|
||||
return fn.call(container, context, container.helpers, container.partials, options.data || data, depths && [context].concat(depths));
|
||||
};
|
||||
prog.program = i;
|
||||
prog.depth = depths ? depths.length : 0;
|
||||
|
||||
Reference in New Issue
Block a user