From b0234e7968370e0668b2998b4c656bfa65630fb7 Mon Sep 17 00:00:00 2001 From: Mike Ralphson Date: Tue, 13 Sep 2016 11:38:29 +0100 Subject: [PATCH] tls: add 'new' keyword for Array constructor call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/8514 Reviewed-By: Brian White Reviewed-By: Prince John Wesley Reviewed-By: Michaƫl Zasso Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- lib/tls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tls.js b/lib/tls.js index 11bf0c53f0f4d1..a1813fc87c7de1 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -29,7 +29,7 @@ exports.getCiphers = internalUtil.cachedResult(() => { // Convert protocols array into valid OpenSSL protocols list // ("\x06spdy/2\x08http/1.1\x08http/1.0") function convertProtocols(protocols) { - const lens = Array(protocols.length); + const lens = new Array(protocols.length); const buff = Buffer.allocUnsafe(protocols.reduce((p, c, i) => { var len = Buffer.byteLength(c); lens[i] = len;