mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-08-06 05:46:26 +00:00
a7bd21ccf2
Fixes #1115 The issue is that replaceAllElements calls a render synchronously, preventing lastBroadcastedOrReceivedSceneVersion from being set correctly. I tried using batchUpdate but it only takes a single argument ( https://github.com/facebook/react/blob/c5d2fc7127654e43de59fff865b74765a103c4a5/packages/react-reconciler/src/ReactFiberWorkLoop.js#L1088 ) whereas the callback takes two. Test Plan: - Add a console.log before `this.broadcastScene("SCENE_UPDATE");` in App.tsx - Connect a bunch of clients - Have one move a shape - Make sure that this client has the console logged - Make sure the other clients don't have it