diff --git a/package.json b/package.json index f75225a..da3ac96 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "duplexify": "^3.2.0", "inherits": "^2.0.1", "through2": "^2.0.0", - "ws": "^2.0.0", + "ws": "^2.2.3", "xtend": "^4.0.0" }, "devDependencies": { diff --git a/stream.js b/stream.js index bc204f1..e530ebd 100644 --- a/stream.js +++ b/stream.js @@ -17,7 +17,7 @@ function WebSocketStream(target, protocols, options) { if (protocols && !Array.isArray(protocols) && 'object' === typeof protocols) { // accept the "options" Object as the 2nd argument options = protocols - protocols = [] + protocols = null if (typeof options.protocol === 'string' || Array.isArray(options.protocol)) { protocols = options.protocol;