diff --git a/lib/https.js b/lib/https.js index 4ee15b2537421f..21103b71af52b6 100644 --- a/lib/https.js +++ b/lib/https.js @@ -45,9 +45,7 @@ function createConnection(port, host, options) { options = port; } else if (host !== null && typeof host === 'object') { options = host; - } else if (options !== null && typeof options === 'object') { - options = options; - } else { + } else if (options === null || typeof options !== 'object') { options = {}; }