From 4537a0b8cf7d2a6e7276a32d81093b636500a0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Steunou?= Date: Mon, 9 Oct 2017 18:22:50 +0200 Subject: [PATCH] Default option protocol should not be in options object by default #57 --- src/webstomp.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webstomp.js b/src/webstomp.js index bc5a698..f835fbd 100644 --- a/src/webstomp.js +++ b/src/webstomp.js @@ -6,8 +6,8 @@ const webstomp = { VERSIONS, // This method creates a WebSocket client that is connected to // the STOMP server located at the url. - client: function(url, options = {protocols: VERSIONS.supportedProtocols()}) { - let ws = new WebSocket(url, options.protocols); + client: function(url, options = {}) { + let ws = new WebSocket(url, options.protocols || VERSIONS.supportedProtocols()); return new Client(ws, options); }, // This method is an alternative to `webstomp.client()` to let the user