Skip to content
Myr

fix route chaining regression. Closes #1397

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by TJ Holowaychuk · committed by TJ Holowaychuk · parent 1f04454 · Browse files · 2 files+8 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+8 added−2 removed

  • tests:+5 added−0 removed
  • other:+3 added−2 removed

2 files+8 added−2 removed

modified:lib/application.js+3 added-2 removed
408 unmodified lines
409 app[method] = function(path){410 if ('get' == method && 1 == arguments.length) return this.set(path); 411 var args = [method].concat([].slice.call(arguments));412 if (!this._usedRouter) this.use(this.router);413 return this._router.route.apply(this._router, args);414 }413 this._router.route.apply(this._router, args);414 return this;415 };416});417418/**419 * Special-cased "all" method, applying the given route `path`,
117 unmodified lines
modified:test/app.router.js+5 added
594 unmodified lines
595 request(app)596 .get('/account/edit')597 .expect('editing user 12', done);598 })599600 it('should be chainable', function(){601 var app = express();602 app.get('/', function(){}).should.equal(app);603 })604})