From d6dff7ab734122ce5a2c813b2017cc1325279243 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Wed, 5 Apr 2017 09:18:58 +0200 Subject: [PATCH] Removed support for protocols regression. --- package.json | 2 +- stream.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;