From dd244c0aede0c4ace43451aaf3702509b28fbc98 Mon Sep 17 00:00:00 2001 From: vdeturckheim Date: Tue, 16 May 2017 16:55:23 +0200 Subject: [PATCH] update argument management in net.Socket.prototype.connect to handle node 8 --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 84b9803..2bbf063 100644 --- a/index.js +++ b/index.js @@ -108,6 +108,7 @@ wrap(net.Socket.prototype, 'connect', function (original) { var args = v7plus ? net._normalizeArgs(arguments) : net._normalizeConnectArgs(arguments); + if (Array.isArray(args[0])) args = args[0] if (args[1]) args[1] = wrapCallback(args[1]); var result = original.apply(this, args); patchOnRead(this);