Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Commit

Permalink
Default option protocol should not be in options object by default #57
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérôme Steunou committed Oct 9, 2017
1 parent fc46b55 commit 4537a0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/webstomp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4537a0b

Please sign in to comment.