Skip to content

Commit

Permalink
Avoid depth construction overhead for non-depthed
Browse files Browse the repository at this point in the history
  • Loading branch information
kpdecker committed Aug 13, 2014
1 parent b695aae commit 625b00e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/handlebars/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 625b00e

Please sign in to comment.