From ee313aad02d35ba49547204cb852081825fd55c8 Mon Sep 17 00:00:00 2001 From: Max Goodhart Date: Sun, 5 Jul 2020 20:19:33 -0700 Subject: [PATCH] Fix missing broadcast of CRDT updates to clients --- src/node/server.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/node/server.js b/src/node/server.js index 39417e8..7b8fd87 100644 --- a/src/node/server.js +++ b/src/node/server.js @@ -97,6 +97,12 @@ function initApp({ } } + stateDoc.on('update', (update) => { + for (const ws of sockets) { + ws.send(update) + } + }) + return { app, broadcastState } }