Skip to content
Browse files

Fix global variable leak

  • Loading branch information...
1 parent ce5a4e4 commit 32fb4fc323d58142a5492f472bc4ca82fc2e326c @ncr ncr committed May 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/advanced_structures/RateLimit.js
View
2 lib/advanced_structures/RateLimit.js
@@ -129,7 +129,7 @@ RateLimit.prototype.count = function (subject, interval, callback) {
//Add up the counts from each bucket
multi.exec(function (err, counts) {
if (err) return callback(err, null);
- for (var count = i = 0, l = counts.length; i < l; i++) {
+ for (var count = 0, i = 0, l = counts.length; i < l; i++) {
if (counts[i]) {
count += parseInt(counts[i], 10);
}

0 comments on commit 32fb4fc

Please sign in to comment.
Something went wrong with that request. Please try again.