GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tls: use optional chaining to simplify checks · nodejs/node@3c8b25b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/tls
    • secure-context.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/tls/secure-context.js‎

Copy file name to clipboardExpand all lines: lib/internal/tls/secure-context.js
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,9 @@ function configSecureContext(context, options = {}, name = 'options') {
161161
for (let i = 0; i < key.length; ++i) {
162162
const val = key[i];
163163
const pem = (
164-
val !== undefined && val !== null &&
165-
val.pem !== undefined ? val.pem : val);
164+
val?.pem !== undefined ? val.pem : val);
166165
const pass = (
167-
val !== undefined && val !== null &&
168-
val.passphrase !== undefined ? val.passphrase : passphrase);
166+
val?.passphrase !== undefined ? val.passphrase : passphrase);
169167
setKey(context, pem, pass, name);
170168
}
171169
} else {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.