Skip to content

Commit

Permalink
Fixed RangeError issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Dec 7, 2010
1 parent 0c2898b commit e5e6994
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/connect/middleware/router.js
Expand Up @@ -102,8 +102,7 @@ module.exports = function router(fn){
(function pass(i){
if (route = match(req, routes, i)) {
var i = 0
, keys = route._keys
, pending = keys.length;
, keys = route._keys;

req.params = route._params;

Expand All @@ -128,7 +127,7 @@ module.exports = function router(fn){
fn(req, res, param, val);
}
// Finished processing params
} else if (!--pending) {
} else if (!key) {
route.call(self, req, res, function(err){
if (err === true) {
next();
Expand Down

0 comments on commit e5e6994

Please sign in to comment.