Account for null chain from database

main
Garrett Mills 4 years ago
parent b68c961046
commit 8745dc8b2b
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

@ -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 || []
}

Loading…
Cancel
Save