diff src/SourceGraph.ts @ 137:a8939c717015

still trying to get build right, but there are other update bugs too
author drewp@bigasterisk.com
date Sat, 06 May 2023 15:34:40 -0700
parents 73a70d00fb74
children cf642d395be4
line wrap: on
line diff
--- a/src/SourceGraph.ts	Sat May 06 14:20:33 2023 -0700
+++ b/src/SourceGraph.ts	Sat May 06 15:34:40 2023 -0700
@@ -40,6 +40,8 @@
       // maybe the event messages should be 'add' and 'del',
       // for less parsing and clearer order of ops.
       ev.addEventListener("patch", async (ev) => {
+        // this is reentrant- ok?
+        
         const patchMsg = JSON.parse((ev as any).data);
 
         const p = new Patch();
@@ -53,6 +55,7 @@
 
         p.applyToStore(this.store);
         console.log("patchlife0: eventsream store changed");
+        // firing before there are listeners
         this.sourceGraphChanged.emit(p);
         if (firstPatch) {
           firstPatch = false;