Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

if tag: avoid leaking __keys variable into global scope

  • Loading branch information...
commit a044f4d998202d1ae4869c1ab8964e39c2ecdf60 1 parent 2670e39
Almad Almad authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/tags/for.js
2  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' +
Please sign in to comment.
Something went wrong with that request. Please try again.