@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/browser.js CHANGED
@@ -3571,13 +3571,22 @@ class GraphAsTask extends Task {
3571
3571
  this.emitEntitlementChange();
3572
3572
  }
3573
3573
  _entitlementUnsub;
3574
+ _subscribingEntitlements = false;
3574
3575
  _subscribeToSubGraphEntitlements(graph) {
3575
3576
  this._entitlementUnsub?.();
3576
- this._entitlementUnsub = graph.subscribeToTaskEntitlements(() => {
3577
- this.emitEntitlementChange();
3578
- });
3577
+ this._entitlementUnsub = undefined;
3578
+ this._subscribingEntitlements = true;
3579
+ try {
3580
+ this._entitlementUnsub = graph.subscribeToTaskEntitlements(() => {
3581
+ this.emitEntitlementChange();
3582
+ });
3583
+ } finally {
3584
+ this._subscribingEntitlements = false;
3585
+ }
3579
3586
  }
3580
3587
  _syncSubGraphEntitlementSubscription(graph = this._subGraph) {
3588
+ if (this._subscribingEntitlements)
3589
+ return;
3581
3590
  if ((this._events?.listenerCount("entitlementChange") ?? 0) === 0) {
3582
3591
  this._entitlementUnsub?.();
3583
3592
  this._entitlementUnsub = undefined;
@@ -8199,4 +8208,4 @@ export {
8199
8208
  BROWSER_GRANTS
8200
8209
  };
8201
8210
 
8202
- //# debugId=8A43A4F12CABDEAB64756E2164756E21
8211
+ //# debugId=7A0EA069F263434964756E2164756E21