more-proms 1.8.2 → 1.8.3

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.
@@ -101,7 +101,7 @@ function execQueue(defaultOptions = {
101
101
  const ob = { f, p, skipAble: options.skipAble, cancelVal: options.cancelVal };
102
102
  queue.push(ob);
103
103
  if (cancelPrevIfPossible && running) {
104
- wantToCancelUntil = ob;
104
+ wantToCancelUntil = wantToCancelUntil === undefined ? ob : queue[Math.max(queue.indexOf(wantToCancelUntil), queue.indexOf(ob))];
105
105
  if ("cancel" in curFP)
106
106
  curFP.cancel(curCancelVal);
107
107
  }
@@ -98,7 +98,7 @@ export function execQueue(defaultOptions = {
98
98
  const ob = { f, p, skipAble: options.skipAble, cancelVal: options.cancelVal };
99
99
  queue.push(ob);
100
100
  if (cancelPrevIfPossible && running) {
101
- wantToCancelUntil = ob;
101
+ wantToCancelUntil = wantToCancelUntil === undefined ? ob : queue[Math.max(queue.indexOf(wantToCancelUntil), queue.indexOf(ob))];
102
102
  if ("cancel" in curFP)
103
103
  curFP.cancel(curCancelVal);
104
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "more-proms",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "A collection of additional promise extending classes. Including a (from the outside) ResablePromise, CancelAblePromise and a latestLatent utility function.",
5
5
  "main": "./app/dist/esm/moreProms.mjs",
6
6
  "types": "./app/dist/esm/moreProms.d.ts",