Skip to content

Commit

Permalink
tls: add 'new' keyword for Array constructor call
Browse files Browse the repository at this point in the history
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 Fishrock123 committed Oct 11, 2016
1 parent a91050c commit b0234e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b0234e7

Please sign in to comment.