https: simpler argument check
authorMichaël Zasso <mic.besace@gmail.com>
Sat, 7 Feb 2015 11:40:05 +0000 (12:40 +0100)
committerBrendan Ashworth <brendan.ashworth@me.com>
Sat, 7 Feb 2015 20:00:16 +0000 (12:00 -0800)
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
lib/https.js

index 4ee15b2..21103b7 100644 (file)
@@ -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 = {};
   }