Skip to content

Commit

Permalink
Merge commit 'c16f1ac'
Browse files Browse the repository at this point in the history
  • Loading branch information
jankuca committed Apr 9, 2012
2 parents ca7fb5b + c16f1ac commit dc41546
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/modules/router.js
Expand Up @@ -129,12 +129,10 @@ var Router = module.exports.Router = Function.inherit(function () {
} else {
if (Object.getOwnPropertyNames(rules).some(function (key) {
var index = param_keys.indexOf(key);
if (index > -1) {
if (!rules[key].test(match[index + 1])) {
return true;
}
params[key] = match[index + 1];
if (index === -1 || !rules[key].test(match[index + 1])) {
return true;
}
params[key] = match[index + 1];
})) {
return;
}
Expand Down

0 comments on commit dc41546

Please sign in to comment.