diff options
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; |