From 2fcee4adb85d0cb1bd912d541ff956c7be28e225 Mon Sep 17 00:00:00 2001 From: haad Date: Wed, 9 Mar 2016 16:09:02 +0100 Subject: [PATCH] Send data as string instead of object --- src/PubSub.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PubSub.js b/src/PubSub.js index d4beb43..8eff4ea 100644 --- a/src/PubSub.js +++ b/src/PubSub.js @@ -43,7 +43,7 @@ class Pubsub { } publish(hash, message) { - this._socket.send({ channel: hash, message: message }); + this._socket.send(JSON.stringify({ channel: hash, message: message })); } _handleMessage(hash, message) {