Skip to content

Commit

Permalink
Ensure req.options is always a new object.
Browse files Browse the repository at this point in the history
refs #3500
  • Loading branch information
sgress454 committed Jan 25, 2016
1 parent ab787f4 commit dfa2765
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/router/bind.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function bindFunction(path, fn, verb, options) {
var enhancedFn = function routeTargetFnWrapper(req, res, next) {

// Set req.options, using `options` to supply default values
req.options = _.merge(options || {}, req.options || {});
req.options = _.merge({}, options || {}, req.options || {});

// This event can be tapped into to take control of logic
// that should be run before each middleware function
Expand Down

0 comments on commit dfa2765

Please sign in to comment.