Skip to content

Commit

Permalink
remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyguerra committed Jan 8, 2024
1 parent 7315e2f commit b12aba2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
1 change: 1 addition & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
===

* deps: Remove setprototypeof
* no longer need to call the restore method to restore `req.params` after invoking router

5.x
===
Expand Down
27 changes: 1 addition & 26 deletions lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Router.prototype.handle = function handle (req, res, callback) {
// manage inter-router variables
var parentParams = req.params
var parentUrl = req.baseUrl || ''
var done = callback //restore(callback, req, 'baseUrl', 'next', 'params')
var done = callback

// setup next layer
req.next = next
Expand Down Expand Up @@ -635,31 +635,6 @@ function processParams (params, layer, called, req, res, done) {
param()
}

/**
* Restore obj props after function
*
* @private
*/

// function restore (fn, obj) {
// var props = new Array(arguments.length - 2)
// var vals = new Array(arguments.length - 2)

// for (var i = 0; i < props.length; i++) {
// props[i] = arguments[i + 2]
// vals[i] = obj[props[i]]
// }

// return function () {
// // restore vals
// for (var i = 0; i < props.length; i++) {
// obj[props[i]] = vals[i]
// }

// return fn.apply(this, arguments)
// }
// }

/**
* Send an OPTIONS response.
*
Expand Down

0 comments on commit b12aba2

Please sign in to comment.