Skip to content

Commit

Permalink
fixup! review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Sep 7, 2024
1 parent 982b9f8 commit 915a7d7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/vow/src/retrier.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ export const prepareRetrierTools = (zone, vowTools = prepareVowTools(zone)) => {
return;
}
// TODO `heapVowE` is likely too fragile under upgrade.
const p = optVerb
? heapVowE(target)[optVerb](...args)
: heapVowE(target)(...args);
const p =
optVerb === undefined
? heapVowE(target)(...args)
: heapVowE(target)[optVerb](...args);
watch(p, watcher);
},
getVow() {
Expand All @@ -72,11 +73,13 @@ export const prepareRetrierTools = (zone, vowTools = prepareVowTools(zone)) => {
},
cancel(reason) {
const { state } = this;
const { vow } = state;
if (state.optResolver === undefined) {
return;
}
state.optResolver.resolve(reason);
state.optResolver.reject(reason);
state.optResolver = undefined;
retrierForOutcomeVowKey.delete(toPassableCap(vow));
},
},
watcher: {
Expand Down

0 comments on commit 915a7d7

Please sign in to comment.