Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Ralphson <mike.ralphson@gmail.com>2016-09-13 13:38:29 +0300
committerLuigi Pinca <luigipinca@gmail.com>2016-09-18 15:25:57 +0300
commit30701a72c04d72d31ab5de8f0003d8ec460928a8 (patch)
treefde7b29976f8df7b44fefeec42c3dab95f2b80bd /lib/tls.js
parentdb1087c9757c31a82c50a1eba368d8cba95b57d0 (diff)
tls: add 'new' keyword for Array constructor call
PR-URL: https://github.com/nodejs/node/pull/8514 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/tls.js')
-rw-r--r--lib/tls.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tls.js b/lib/tls.js
index 765e1658ea9..131c7c89244 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;