Account for null chain from database

This commit is contained in:
2021-04-10 20:38:25 -05:00
parent b68c961046
commit 8745dc8b2b

View File

@@ -190,7 +190,7 @@ export class Blockchain extends Unit {
this.logging.debug({peers, chain})
this.approvedChain = chain.map((item: BlockResourceItem) => new Block(item))
this.approvedChain = (chain || []).map((item: BlockResourceItem) => new Block(item))
this.peers = peers || []
}