From 207c1fe2407ce1c898c75de504c31e4c1ca6cc57 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 3 May 2018 07:43:56 +0200 Subject: [PATCH] net: remove hasCallback from listen function This commit removes hasCallback which is declared as var but only used once in the line following the declaration and never reassigned. --- lib/net.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/net.js b/lib/net.js index 6c475619117dc5..d3b3a18e269537 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1416,8 +1416,7 @@ Server.prototype.listen = function(...args) { throw new ERR_SERVER_ALREADY_LISTEN(); } - var hasCallback = (cb !== null); - if (hasCallback) { + if (cb !== null) { this.once('listening', cb); } var backlogFromArgs =