diff --git a/package.json b/package.json index c5d77f97..bd71b21b 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "now-start": "npm run websocket-server" }, "files": [ + "build/*", "bindings/*", "docs/*", "examples/*", diff --git a/provider/websocket/WebSocketProvider.js b/provider/websocket/WebSocketProvider.js index 107ba649..761c2862 100644 --- a/provider/websocket/WebSocketProvider.js +++ b/provider/websocket/WebSocketProvider.js @@ -104,8 +104,8 @@ class WebsocketsSharedDocument extends Y.Y { setupWS(this, url) this.on('afterTransaction', broadcastUpdate) this._bcSubscriber = data => { + const encoder = readMessage(this, data) // already muxed this.mux(() => { - const encoder = readMessage(this, data) if (Y.encoding.length(encoder) > 1) { bc.publish(url, Y.encoding.toBuffer(encoder)) }