@flowgram.ai/variable-core 0.2.26 → 0.2.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -118,6 +118,7 @@ var VariableTable = class {
118
118
  constructor(parentTable) {
119
119
  this.parentTable = parentTable;
120
120
  this.table = /* @__PURE__ */ new Map();
121
+ this.toDispose = new import_utils2.DisposableCollection();
121
122
  this.onDataChangeEmitter = new import_utils2.Emitter();
122
123
  this.variables$ = new import_rxjs.Subject();
123
124
  // 监听变量列表中的单个变量变化
@@ -139,6 +140,11 @@ var VariableTable = class {
139
140
  */
140
141
  this.onDataChange = this.onDataChangeEmitter.event;
141
142
  this._version = 0;
143
+ this.toDispose.pushAll([
144
+ this.onDataChangeEmitter,
145
+ // active share()
146
+ this.onAnyVariableChange(() => null)
147
+ ]);
142
148
  }
143
149
  /**
144
150
  * listen to any variable update in list
@@ -228,7 +234,7 @@ var VariableTable = class {
228
234
  this.parentTable?.fireChange();
229
235
  this.variables$.complete();
230
236
  this.variables$.unsubscribe();
231
- this.onDataChangeEmitter.dispose();
237
+ this.toDispose.dispose();
232
238
  }
233
239
  };
234
240