Skip to content

Commit

Permalink
continue on "Cannot read property length of undefined"
Browse files Browse the repository at this point in the history
  • Loading branch information
barrystyle committed Aug 11, 2019
1 parent bf99bb5 commit 25bf71a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ module.exports = {
if (blockhash) {
lib.get_block(blockhash, function(block) {
if (block) {
try {
lib.syncLoop(block.tx.length, function (subloop) {
var i = subloop.iteration();
Tx.findOne({txid: block.tx[i]}, function(err, tx) {
Expand All @@ -664,6 +665,7 @@ module.exports = {
block = null;
loop.next();
});
} catch (e) {}
} else {
console.log('block not found: %s', blockhash);
loop.next();
Expand Down

0 comments on commit 25bf71a

Please sign in to comment.