From b0f7b776ea14fb0f10c84d316212381fc193ccd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 7 Feb 2015 12:40:05 +0100 Subject: [PATCH] https: simpler argument check --- lib/https.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 = {}; }