diff options
-rw-r--r-- | src/bun.js/net.exports.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bun.js/net.exports.js b/src/bun.js/net.exports.js index 8d283dd1e..11e9ce24b 100644 --- a/src/bun.js/net.exports.js +++ b/src/bun.js/net.exports.js @@ -197,7 +197,10 @@ export const Socket = (function (InternalSocket) { connect(port, host, connectListener) { // TODO support IPC sockets var path; - if (typeof host == "function") { + if (arguments.length === 1 && typeof port === "string") { + path = port; + port = undefined; + } else if (typeof host == "function") { if (typeof port === "string") { path = port; port = undefined; |