diff --git a/socket.js b/socket.js index 8a20ab0..518781c 100644 --- a/socket.js +++ b/socket.js @@ -9,7 +9,7 @@ function isEventEmitter (o) { return typeof o === 'object' && o !== null && typeof o.on === 'function' } -module.exports = function getNetworkOptions (opts) { +module.exports = function getNetworkOptions (opts = {}) { if (isEventEmitter(opts)) return opts if (!opts.host && !opts.port) return getSocketPath() if (opts.host && !opts.port) return getSocketPath(opts.host)