Permalink
Browse files

misc refactoring

  • Loading branch information...
1 parent d8d23c0 commit 9be5992f22c3c335a95b32a88dde13f4928c1e16 Tj Holowaychuk committed Apr 26, 2011
Showing with 3 additions and 2 deletions.
  1. +2 −2 lib/router/index.js
  2. +1 −0 lib/router/route.js
View
@@ -282,9 +282,9 @@ function match(req, routes, i) {
if (captures = path.exec(pathname)) {
fn.method = method;
fn.params = [];
- for (var j = 1, len = captures.length; j < len; ++j) {
+ for (var j = 1, l = captures.length; j < l; ++j) {
var key = keys[j-1],
- val = typeof captures[j] === 'string'
+ val = 'string' == typeof captures[j]
? decodeURIComponent(captures[j])
: captures[j];
if (key) {
View
@@ -26,6 +26,7 @@ function Route(method, path, fn) {
this.path = path;
this.regexp = normalize(path, this.keys = []);
this.method = method;
+ this.params = [];
}
/**

0 comments on commit 9be5992

Please sign in to comment.