Skip to content
Permalink
Browse files

tls: add 'new' keyword for Array constructor call

PR-URL: #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>
  • Loading branch information...
MikeRalphson authored and lpinca committed Sep 13, 2016
1 parent db1087c commit 30701a72c04d72d31ab5de8f0003d8ec460928a8
Showing with 1 addition and 1 deletion.
  1. +1 −1 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;

0 comments on commit 30701a7

Please sign in to comment.
You can’t perform that action at this time.