Skip to content

Commit

Permalink
Don't mutate template AST in evaluate. Fixes #1143
Browse files Browse the repository at this point in the history
  • Loading branch information
dgreensp committed Jun 20, 2013
1 parent e03ec98 commit 972e295
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/handlebars/evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ Handlebars.evaluate = function (ast, data, options) {
if (id[1] === '') {
// an empty path segment is our AST's way of encoding
// the presence of 'this.' at the beginning of the path.
id = id.slice();
id.splice(1, 1); // remove the ''
scopedToContext = true;
}
Expand Down

0 comments on commit 972e295

Please sign in to comment.