Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.

Commit

Permalink
if tag: avoid leaking __keys variable into global scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Almad committed Sep 3, 2012
1 parent 2670e39 commit a044f4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tags/for.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = function (indent, parentBlock, parser) {
parser.compile.apply(this, [indent + ' ', parentBlock]); parser.compile.apply(this, [indent + ' ', parentBlock]);


out = '(function () {\n' + out = '(function () {\n' +
' var loop = {}, __loopKey, __loopIndex = 0, __loopLength = 0,' + ' var loop = {}, __loopKey, __loopIndex = 0, __loopLength = 0, __keys = [],' +
' __ctx_operand = _context["' + operand1 + '"],\n' + ' __ctx_operand = _context["' + operand1 + '"],\n' +
' loop_cycle = function() {\n' + ' loop_cycle = function() {\n' +
' var args = _.toArray(arguments), i = loop.index0 % args.length;\n' + ' var args = _.toArray(arguments), i = loop.index0 % args.length;\n' +
Expand Down

0 comments on commit a044f4d

Please sign in to comment.