@workglow/task-graph 0.2.4 → 0.2.5

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/bun.js CHANGED
@@ -3572,13 +3572,22 @@ class GraphAsTask extends Task {
3572
3572
  this.emitEntitlementChange();
3573
3573
  }
3574
3574
  _entitlementUnsub;
3575
+ _subscribingEntitlements = false;
3575
3576
  _subscribeToSubGraphEntitlements(graph) {
3576
3577
  this._entitlementUnsub?.();
3577
- this._entitlementUnsub = graph.subscribeToTaskEntitlements(() => {
3578
- this.emitEntitlementChange();
3579
- });
3578
+ this._entitlementUnsub = undefined;
3579
+ this._subscribingEntitlements = true;
3580
+ try {
3581
+ this._entitlementUnsub = graph.subscribeToTaskEntitlements(() => {
3582
+ this.emitEntitlementChange();
3583
+ });
3584
+ } finally {
3585
+ this._subscribingEntitlements = false;
3586
+ }
3580
3587
  }
3581
3588
  _syncSubGraphEntitlementSubscription(graph = this._subGraph) {
3589
+ if (this._subscribingEntitlements)
3590
+ return;
3582
3591
  if ((this._events?.listenerCount("entitlementChange") ?? 0) === 0) {
3583
3592
  this._entitlementUnsub?.();
3584
3593
  this._entitlementUnsub = undefined;
@@ -7563,4 +7572,4 @@ export {
7563
7572
  BROWSER_GRANTS
7564
7573
  };
7565
7574
 
7566
- //# debugId=760D1F366E5E570764756E2164756E21
7575
+ //# debugId=68A264276606E85C64756E2164756E21