From 1d9e4ee3231173d5acaf96dbce94a7529b15396b Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 21 Dec 2018 14:39:46 +0100 Subject: [PATCH] Use the correct `host` when falling back --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 358231c..4a98fc4 100644 --- a/index.js +++ b/index.js @@ -27,5 +27,5 @@ const getPort = (options = {}) => { }; module.exports = options => options ? - getPort(options).catch(() => getPort({port: 0})) : + getPort(options).catch(() => getPort(Object.assign(options, {port: 0}))) : getPort({port: 0});