Skip to content

Commit

Permalink
Add reflection property for layer
Browse files Browse the repository at this point in the history
  • Loading branch information
calebmer committed Oct 2, 2015
1 parent 6bae01f commit bf0b4e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ Route.prototype.dispatch = function dispatch(req, res, done) {
match = !layer.method || layer.method === method
}

// set a reference to the current layer
next._currentLayer = layer

// no match
if (match !== true) {
return done(err)
Expand Down

0 comments on commit bf0b4e9

Please sign in to comment.