diff --git a/light9/web/SyncedGraph.ts b/light9/web/SyncedGraph.ts --- a/light9/web/SyncedGraph.ts +++ b/light9/web/SyncedGraph.ts @@ -156,12 +156,12 @@ export class SyncedGraph { log("not connected-- dropping patch"); return; } - if (patch.isEmpty()) throw "should not get to this point with empty patch"; - - this._applyPatch(patch); - if (this.client) { - log("sending patch:\n", patch.dump()); - this.client.sendPatch(patch); + if (!patch.isEmpty()) { + this._applyPatch(patch); + if (this.client) { + log("sending patch:\n", patch.dump()); + this.client.sendPatch(patch); + } } console.timeEnd("applyAndSendPatch"); }