summaryrefslogtreecommitdiff
path: root/lib/_tls_common.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_tls_common.js')
-rw-r--r--lib/_tls_common.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/_tls_common.js b/lib/_tls_common.js
index ed0bd4c23f..92ba45d57e 100644
--- a/lib/_tls_common.js
+++ b/lib/_tls_common.js
@@ -80,7 +80,7 @@ exports.createSecureContext = function createSecureContext(options, context) {
// NOTE: It's important to add CA before the cert to be able to load
// cert's issuer in C++ code.
var ca = options.ca;
- if (ca !== undefined) {
+ if (ca) {
if (Array.isArray(ca)) {
for (i = 0; i < ca.length; ++i) {
val = ca[i];
@@ -96,7 +96,7 @@ exports.createSecureContext = function createSecureContext(options, context) {
}
var cert = options.cert;
- if (cert !== undefined) {
+ if (cert) {
if (Array.isArray(cert)) {
for (i = 0; i < cert.length; ++i) {
val = cert[i];
@@ -115,7 +115,7 @@ exports.createSecureContext = function createSecureContext(options, context) {
// which leads to the crash later on.
var key = options.key;
var passphrase = options.passphrase;
- if (key !== undefined) {
+ if (key) {
if (Array.isArray(key)) {
for (i = 0; i < key.length; ++i) {
val = key[i];