Skip to content

Commit

Permalink
fix: fix double invoke bug (#1117)
Browse files Browse the repository at this point in the history
  • Loading branch information
erights authored May 15, 2020
1 parent 4b352fc commit b8d462e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/eventual-send/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,11 @@ export function makeHandledPromise(Promise) {
if (typeof handler[operation] !== 'function') {
throw TypeError(`${handlerName}.${operation} is not a function`);
}
// If we throw, the race is not over.
resolve(handler[operation](o, ...opArgs, returnedP));
try {
resolve(handler[operation](o, ...opArgs, returnedP));
} catch (reason) {
reject(reason);
}
raceIsOver = true;
}

Expand Down

0 comments on commit b8d462e

Please sign in to comment.