@itwin/core-i18n 5.7.0-dev.14 → 5.7.0-dev.15

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.
@@ -19183,11 +19183,15 @@ class OneAtATimeAction {
19183
19183
  return await promise;
19184
19184
  }
19185
19185
  finally {
19186
- // do all of this whether promise was fulfilled or rejected
19187
- this._active = this._pending; // see if there's a pending request waiting
19188
- this._pending = undefined; // clear pending
19189
- if (this._active)
19190
- this._active.start(); // eslint-disable-line @typescript-eslint/no-floating-promises
19186
+ // A replaced pending request can be abandoned before it ever becomes active.
19187
+ // Only the currently active entry is allowed to promote/start the next pending request.
19188
+ if (this._active === entry) {
19189
+ // do all of this whether promise was fulfilled or rejected
19190
+ this._active = this._pending; // see if there's a pending request waiting
19191
+ this._pending = undefined; // clear pending
19192
+ if (this._active)
19193
+ this._active.start(); // eslint-disable-line @typescript-eslint/no-floating-promises
19194
+ }
19191
19195
  }
19192
19196
  }
19193
19197
  }