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 jasnell committed Oct 17, 2018
1 parent a797923 commit d1a23cc
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 @@ -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 d1a23cc

Please sign in to comment.