Changeset - 702c1fd95dfd
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 20 months ago 2023-05-29 22:18:32
drewp@bigasterisk.com
another empty-patch guard, to cause me to fix problems upstream of this call
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
light9/web/SyncedGraph.ts
Show inline comments
 
@@ -161,24 +161,25 @@ export class SyncedGraph {
 
    this._applyPatch(patch);
 
    if (this.client) {
 
      log("sending patch:\n", patch.dump());
 
      this.client.sendPatch(patch);
 
    }
 
    console.timeEnd("applyAndSendPatch");
 
  }
 

	
 
  _applyPatch(patch: Patch) {
 
    // In most cases you want applyAndSendPatch.
 
    //
 
    // This is the only method that writes to this.graph!
 
    if (patch.isEmpty()) throw "dont send empty patches here";
 
    log("_applyPatch [1] \n", patch.dump());
 
    this.cachedFloatValues.clear();
 
    this.cachedUriValues.clear();
 
    patch.applyToGraph(this.graph);
 
    if (false) {
 
      log("applied patch locally", patch.summary());
 
    } else {
 
      log("applied patch locally:\n" + patch.dump());
 
    }
 
    this.autoDeps.graphChanged(patch);
 
  }
 

	
0 comments (0 inline, 0 general)