From 2011ed334416b9e1e655072fbe3ad53ceac86d1d Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Fri, 14 Aug 2020 23:04:49 +0800 Subject: [PATCH] fix: undefined is a valid result for getBlockTime --- web3.js/src/connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web3.js/src/connection.js b/web3.js/src/connection.js index 10907472f1..f3efb1ed27 100644 --- a/web3.js/src/connection.js +++ b/web3.js/src/connection.js @@ -575,7 +575,7 @@ const GetBlockTimeRpcResult = struct({ jsonrpc: struct.literal('2.0'), id: 'string', error: 'any?', - result: struct.union(['null', 'number']), + result: struct.union(['null', 'number', 'undefined']), }); /**