Comparing version 6.5.3 to 6.6.0
@@ -28,2 +28,3 @@ var assert = require('assert') | ||
route = route || '/' | ||
cb.route = route | ||
@@ -52,3 +53,4 @@ if (cb && cb._wayfarer && cb._trie) { | ||
args[0] = node.params | ||
return node.cb.apply(null, args) | ||
var cb = node.cb | ||
return cb.apply(cb, args) | ||
} | ||
@@ -59,3 +61,4 @@ | ||
args[0] = dft.params | ||
return dft.cb.apply(null, args) | ||
var dftcb = dft.cb | ||
return dftcb.apply(dftcb, args) | ||
} | ||
@@ -62,0 +65,0 @@ |
{ | ||
"name": "wayfarer", | ||
"version": "6.5.3", | ||
"version": "6.6.0", | ||
"description": "Composable trie based router", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -251,2 +251,11 @@ var wayfarer = require('../') | ||
}) | ||
t.test('should expose .router property', function (t) { | ||
t.plan(1) | ||
var r = wayfarer() | ||
r.on('/foo', function () { | ||
t.equal(this.route, '/foo', 'exposes route property') | ||
}) | ||
r('/foo') | ||
}) | ||
}) |
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
28157
603