From 58086dcabef5bcfba4014a3a3cc7eb1678252e9b Mon Sep 17 00:00:00 2001 From: cubedro Date: Wed, 15 Apr 2015 22:50:08 +0300 Subject: [PATCH] added tx property check --- lib/node.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/node.js b/lib/node.js index 343c0c6..8bb6807 100644 --- a/lib/node.js +++ b/lib/node.js @@ -293,7 +293,10 @@ Node.prototype.txDensityChart = function() { return txDensity = _.map(this.blocks, function(block) { - return block.transactions.length; + if(typeof block.transactions !== 'undefined') + return block.transactions.length; + + return 0; }); }