diff src/MultiStore.ts @ 146:9347277e8311

try a bit harder to notice <sg-source> children after <streamed-graph> startup
author drewp@bigasterisk.com
date Mon, 08 May 2023 13:52:50 -0700
parents 379c4294dd0f
children
line wrap: on
line diff
--- a/src/MultiStore.ts	Mon May 08 13:31:46 2023 -0700
+++ b/src/MultiStore.ts	Mon May 08 13:52:50 2023 -0700
@@ -27,6 +27,11 @@
   }
 
   newStore(s: SourceGraph) {
+    for (let ts of this.stores) {
+      if (ts==s.store) {
+        return;
+      }
+    }
     this.stores.push(s.store);
     const p = new Patch(PatchDirection.ADD); // todo
     s.sourceGraphChanged.subscribe((p) => {