Skip to content
Myr

Route#run() now applies arguments

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

authored by visionmedia · committed by visionmedia · parent af0493b · Browse files · 1 file+6 added−5 removed
This commit

State

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

Diff stats

1 file+6 added−5 removed

  • other:+6 added−5 removed

1 file+6 added−5 removed

modified:lib/express/core.js+6 added-5 removed
56 unmodified lines
57 this.fn = fn58 },59 60 /**61 * Execute this route's #fn returning62 * it's return value.61 * Execute this route's #fn with _args_,62 * returning it's return value.63 *64 * @param {mixed} args ...65 * @return {mixed}66 * @api private67 */68 68 run: function(){69 return this.fn()69 run: function() {70 return this.fn.apply(GLOBAL, arguments)71 },72 73 /**74 * Normalize _path_. When a RegExp it is simply returned,
59 unmodified lines
134 135 route: function(request){136 this.request = request137 var route = this.matchingRoute()137 return route ? route.run() : halt()138 return route ? route.run(this.captures.slice(1)) : halt()139 },140 141 /**142 * Attempt to match a route from Express.routes.
145 unmodified lines