Skip to content

Commit d59df36

Browse files
NolikMylesBorins
authored andcommitted
tls: replace var with let and const
PR-URL: #30299 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent b141556 commit d59df36

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎lib/_tls_common.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ exports.SecureContext = SecureContext;
9191
exports.createSecureContext=functioncreateSecureContext(options){
9292
if(!options)options={};
9393

94-
varsecureOptions=options.secureOptions;
94+
letsecureOptions=options.secureOptions;
9595
if(options.honorCipherOrder)
9696
secureOptions|=SSL_OP_CIPHER_SERVER_PREFERENCE;
9797

9898
constc=newSecureContext(options.secureProtocol,secureOptions,
9999
options.minVersion,options.maxVersion);
100-
vari;
101-
varval;
100+
leti;
101+
letval;
102102

103103
// Add CA before the cert to be able to load cert's issuer in C++ code.
104104
const{ ca }=options;
@@ -313,7 +313,7 @@ exports.translatePeerCertificate = function translatePeerCertificate(c) {
313313
}
314314
if(c.subject!=null)c.subject=parseCertString(c.subject);
315315
if(c.infoAccess!=null){
316-
varinfo=c.infoAccess;
316+
constinfo=c.infoAccess;
317317
c.infoAccess=Object.create(null);
318318

319319
// XXX: More key validation?

0 commit comments

Comments
 (0)