From b312b3b48560476aff188b72c1f6feef03d03b61 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 6 May 2022 17:03:49 +0200 Subject: [PATCH] fix: use empty array for ws protocols instead of null (#2140) --- src/routes/_thirdparty/websocket/websocket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/_thirdparty/websocket/websocket.js b/src/routes/_thirdparty/websocket/websocket.js index c20def11..ef6627c4 100644 --- a/src/routes/_thirdparty/websocket/websocket.js +++ b/src/routes/_thirdparty/websocket/websocket.js @@ -8,7 +8,7 @@ export class WebSocketClient { * @param protocols DOMString|DOMString[] Either a single protocol string or an array of protocol strings. These strings are used to indicate sub-protocols, so that a single server can implement multiple WebSocket sub-protocols (for example, you might want one server to be able to handle different types of interactions depending on the specified protocol). If you don't specify a protocol string, an empty string is assumed. * @param options options */ - constructor (url, protocols = null, options = {}) { + constructor (url, protocols = [], options = {}) { this.url = url this.protocols = protocols