Permalink
Browse files

if tag: avoid leaking __keys variable into global scope

  • Loading branch information...
1 parent 2670e39 commit a044f4d998202d1ae4869c1ab8964e39c2ecdf60 @Almad Almad committed Sep 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/tags/for.js
View
@@ -38,7 +38,7 @@ module.exports = function (indent, parentBlock, parser) {
parser.compile.apply(this, [indent + ' ', parentBlock]);
out = '(function () {\n' +
- ' var loop = {}, __loopKey, __loopIndex = 0, __loopLength = 0,' +
+ ' var loop = {}, __loopKey, __loopIndex = 0, __loopLength = 0, __keys = [],' +
' __ctx_operand = _context["' + operand1 + '"],\n' +
' loop_cycle = function() {\n' +
' var args = _.toArray(arguments), i = loop.index0 % args.length;\n' +

0 comments on commit a044f4d

Please sign in to comment.