Skip to content
Myr

Removed Route#run(). Closes #188

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

authored by visionmedia · committed by visionmedia · parent 1a9a367 · Browse files · 1 file+1 added−14 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+1 added−14 removed

  • other:+1 added−14 removed

1 file+1 added−14 removed

modified:lib/express/core.js+1 added-14 removed
43 unmodified lines
44 this.fn = fn45 },46 47 /**48 * Execute this route's #fn with _args_,49 * against _context_ or GLOBAL.50 *51 * @param {array} args52 * @return {mixed}53 * @api private54 */55 56 run: function(args, context) {57 return this.fn.apply(context || GLOBAL, args)58 },59 60 /**48 * Normalize _path_. When a RegExp it is simply returned,49 * otherwise a string is converted to a regular expression50 * surrounded by ^$. So /user/:id/edit would become:51 *
56 unmodified lines
108 109 route: function(){110 var route = this.matchingRoute()111 if (route)125 return route.run(this.request.captures.slice(1), this.request)112 return route.fn.apply(this.request, this.request.captures.slice(1))113 else if (this.request.accepts('html') && set('helpful 404'))114 this.request.halt(404, require('express/pages/not-found').render(this.request))115 else116 this.request.halt()
205 unmodified lines