Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

misc refactoring

  • Loading branch information...
commit 9be5992f22c3c335a95b32a88dde13f4928c1e16 1 parent d8d23c0
@tj tj authored
Showing with 3 additions and 2 deletions.
  1. +2 −2 lib/router/index.js
  2. +1 −0  lib/router/route.js
View
4 lib/router/index.js
@@ -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
1  lib/router/route.js
@@ -26,6 +26,7 @@ function Route(method, path, fn) {
this.path = path;
this.regexp = normalize(path, this.keys = []);
this.method = method;
+ this.params = [];
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.