diff --git a/index.js b/index.js index 4a98fc4..c1d6585 100644 --- a/index.js +++ b/index.js @@ -13,7 +13,9 @@ const isAvailable = options => new Promise((resolve, reject) => { }); }); -const getPort = (options = {}) => { +const getPort = options => { + options = Object.assign({}, options); + if (typeof options.port === 'number') { options.port = [options.port]; }