Merge pull request #15 from thereapman/patch-1

Harden against missing transactions property
This commit is contained in:
ChainSafe 2019-02-21 15:07:03 -05:00 committed by GitHub
commit 35ccd7a656
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -606,7 +606,7 @@ History.prototype.getCharts = function()
blocktime: item.block.time / 1000, blocktime: item.block.time / 1000,
difficulty: item.block.difficulty, difficulty: item.block.difficulty,
uncles: item.block.uncles.length, uncles: item.block.uncles.length,
transactions: item.block.transactions.length, transactions: item.block.transactions ? item.block.transactions.length : 0,
gasSpending: item.block.gasUsed, gasSpending: item.block.gasUsed,
gasLimit: item.block.gasLimit, gasLimit: item.block.gasLimit,
miner: item.block.miner miner: item.block.miner