diff options
author | 2023-01-27 18:33:53 -0300 | |
---|---|---|
committer | 2023-01-27 13:33:53 -0800 | |
commit | c1d05cf623694262c20449a98103ee3ee02eea40 (patch) | |
tree | 457db44f10fc4c3c940b02118f81f936de266ec4 /src/bun.js/http.exports.js | |
parent | 724f23c19f505a4ec18f96a047493fc5851a34b2 (diff) | |
download | bun-c1d05cf623694262c20449a98103ee3ee02eea40.tar.gz bun-c1d05cf623694262c20449a98103ee3ee02eea40.tar.zst bun-c1d05cf623694262c20449a98103ee3ee02eea40.zip |
fix(Express.js) Express.js try to use function as hostname (#1914)
Diffstat (limited to 'src/bun.js/http.exports.js')
-rw-r--r-- | src/bun.js/http.exports.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bun.js/http.exports.js b/src/bun.js/http.exports.js index 1655fa09d..dd3745b30 100644 --- a/src/bun.js/http.exports.js +++ b/src/bun.js/http.exports.js @@ -43,13 +43,12 @@ export class Server extends EventEmitter { const server = this; if (typeof host === "function") { onListen = host; + host = undefined; } if (typeof port === "function") { onListen = port; - } - - if (typeof port === "object") { + } else if (typeof port === "object") { host = port?.host; port = port?.port; if (typeof port?.callback === "function") onListen = port?.callback; |