Comparing version 1.0.5 to 1.0.6
@@ -404,5 +404,7 @@ /* | ||
// Remember to ignore keys (i.e. values of `r`) which | ||
// are actual methods (e.g. `on`, `before`, etc). | ||
// are actual methods (e.g. `on`, `before`, etc), but | ||
// which are not actual nested route (i.e. JSON literals). | ||
// | ||
if (routes.hasOwnProperty(r) && !this._methods[r]) { | ||
if (routes.hasOwnProperty(r) && (!this._methods[r] || | ||
this._methods[r] && typeof routes[r] === 'object' && !Array.isArray(routes[r]))) { | ||
// | ||
@@ -598,3 +600,7 @@ // Attempt to make an exact match for the current route | ||
self[method] = function () { | ||
self.on.apply(self, [method].concat(Array.prototype.slice.call(arguments))); | ||
var extra = arguments.length === 1 | ||
? [method, ''] | ||
: [method]; | ||
self.on.apply(self, extra.concat(Array.prototype.slice.call(arguments))); | ||
}; | ||
@@ -601,0 +607,0 @@ })(methods[i]); |
@@ -5,3 +5,3 @@ { | ||
"author": "Nodejitsu Inc <info@nodejitsu.com>", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"maintainers": [ "hij1nx <hij1nx@me.com>", "indexzero <charlie.robbins@gmail.com>" ], | ||
@@ -8,0 +8,0 @@ "contributors": [ |
@@ -59,2 +59,3 @@ /* | ||
router.get(/foo\/bar\/(\w+)/, helloWorld); | ||
router.get(/foo\/update\/(\w+)/, helloWorld); | ||
router.path(/bar\/bazz\//, function () { | ||
@@ -70,2 +71,3 @@ this.get(/(\w+)/, helloWorld) | ||
"a request to foo/bar/bark": assertGet('foo/bar/bark'), | ||
"a request to foo/update/bark": assertGet('foo/update/bark'), | ||
"a request to bar/bazz/bark": assertGet('bar/bazz/bark') | ||
@@ -72,0 +74,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
236466
34
3743