mirror of
https://github.com/expressjs/express.git
synced 2026-02-21 19:41:36 +00:00
refactor: use cached slice in app.listen (#6897)
Signed-off-by: Tacit1 <tacitim5@gmail.com>
This commit is contained in:
@@ -597,7 +597,7 @@ app.render = function render(name, options, callback) {
|
||||
|
||||
app.listen = function listen() {
|
||||
var server = http.createServer(this)
|
||||
var args = Array.prototype.slice.call(arguments)
|
||||
var args = slice.call(arguments)
|
||||
if (typeof args[args.length - 1] === 'function') {
|
||||
var done = args[args.length - 1] = once(args[args.length - 1])
|
||||
server.once('error', done)
|
||||
|
||||
Reference in New Issue
Block a user