From 4204d29131adaf0c3ec6e9cc394661c8c67acc71 Mon Sep 17 00:00:00 2001 From: David Murdoch Date: Tue, 23 Jun 2020 12:32:34 -0400 Subject: [PATCH] fix(forking): add workaround for inally for Node 8 --- lib/utils/forkedblockchain.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/utils/forkedblockchain.js b/lib/utils/forkedblockchain.js index 0c1f8f43d4..2355f69a3f 100644 --- a/lib/utils/forkedblockchain.js +++ b/lib/utils/forkedblockchain.js @@ -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;