Skip to content

Commit

Permalink
tls: update try catch syntax
Browse files Browse the repository at this point in the history
try catch syntax allows elimination of function arguments
so removed unused err argument

PR-URL: #23484
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
UNLRN authored and addaleax committed Oct 14, 2018
1 parent 446aadd commit 7b3f14a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tls.js
Expand Up @@ -176,7 +176,7 @@ exports.checkServerIdentity = function checkServerIdentity(hostname, cert) {
let uri;
try {
uri = new URL(name.slice(4));
} catch (err) {
} catch {
uri = url.parse(name.slice(4));
if (!urlWarningEmitted && !process.noDeprecation) {
urlWarningEmitted = true;
Expand Down

0 comments on commit 7b3f14a

Please sign in to comment.