Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
fix(forking): add workaround for finally missing in Node 8 (#594)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmurdoch authored Jun 23, 2020
1 parent a46e494 commit 37f5a7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/utils/forkedblockchain.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ function ForkedBlockchain(options) {
};

pendingRequests.set(key, pendingRequest);
promise.finally(() => {
// Node 8 doesn't have Promise.finally
promise.catch(() => {}).then(() => {
pendingRequests.delete(key);
});
return promise;
Expand Down

0 comments on commit 37f5a7a

Please sign in to comment.