Skip to content

Commit

Permalink
Fixed a bug when serializing event data (closes #9)
Browse files Browse the repository at this point in the history
Push to 2.0.2
  • Loading branch information
bminer committed Nov 22, 2019
1 parent adc5979 commit 054083a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/wrapper.js
Expand Up @@ -246,7 +246,7 @@ class WebSocketWrapper extends WebSocketChannel {
to the Socket. */
_sendEvent(channel, eventName, args, isRequest) {
// Serialize data for sending over the socket
var data = {"a": args};
var data = {"a": Array.prototype.slice.call(args)};
if(channel != null) {
data.c = channel;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "ws-wrapper",
"version": "2.0.1",
"version": "2.0.2",
"description": "Lightweight WebSocket wrapper lib with socket.io-like event handling, requests, and channels",
"main": "./lib/wrapper.js",
"browser": "./dist/index.js",
Expand Down

0 comments on commit 054083a

Please sign in to comment.